--- jsr166/src/jsr166e/ConcurrentHashMapV8.java 2011/08/30 13:30:35 1.6
+++ jsr166/src/jsr166e/ConcurrentHashMapV8.java 2011/08/30 14:55:58 1.9
@@ -54,7 +54,7 @@ import java.io.Serializable;
*
Resizing this or any other kind of hash table is a relatively
* slow operation, so, when possible, it is a good idea to provide
* estimates of expected table sizes in constructors. Also, for
- * compatability with previous versions of this class, constructors
+ * compatibility with previous versions of this class, constructors
* may optionally specify an expected {@code concurrencyLevel} as an
* additional hint for internal sizing.
*
@@ -83,8 +83,8 @@ public class ConcurrentHashMapV8
/**
* A function computing a mapping from the given key to a value,
- * or null
if there is no mapping. This is a
- * place-holder for an upcoming JDK8 interface.
+ * or {@code null} if there is no mapping. This is a place-holder
+ * for an upcoming JDK8 interface.
*/
public static interface MappingFunction {
/**
@@ -192,12 +192,12 @@ public class ConcurrentHashMapV8
* in 8 puts check threshold (and after resizing, many fewer do
* so). But this approximation has high variance for small table
* sizes, so we check on any collision for sizes <= 64. Further,
- * to increase the probablity that a resize occurs soon enough, we
+ * to increase the probability that a resize occurs soon enough, we
* offset the threshold (see THRESHOLD_OFFSET) by the expected
* number of puts between checks. This is currently set to 8, in
* accord with the default load factor. In practice, this is
* rarely overridden, and in any case is close enough to other
- * plausible values not to waste dynamic probablity computation
+ * plausible values not to waste dynamic probability computation
* for more precision.
*/
@@ -217,7 +217,7 @@ public class ConcurrentHashMapV8
/**
* The default initial table capacity. Must be a power of 2, at
- * least MINIMUM_CAPACITY and at most MAXIMUM_CAPACITY
+ * least MINIMUM_CAPACITY and at most MAXIMUM_CAPACITY.
*/
static final int DEFAULT_CAPACITY = 16;
@@ -234,7 +234,7 @@ public class ConcurrentHashMapV8
static final int DEFAULT_CONCURRENCY_LEVEL = 16;
/**
- * The count value to offset thesholds to compensate for checking
+ * The count value to offset thresholds to compensate for checking
* for resizing only when inserting into bins with two or more
* elements. See above for explanation.
*/
@@ -271,7 +271,7 @@ public class ConcurrentHashMapV8
transient Set> entrySet;
transient Collection values;
- /** For serialization compatability. Null unless serialized; see below */
+ /** For serialization compatibility. Null unless serialized; see below */
Segment[] segments;
/**
@@ -309,7 +309,7 @@ public class ConcurrentHashMapV8
}
/*
- * Volatile access nethods are used for table elements as well as
+ * Volatile access methods are used for table elements as well as
* elements of in-progress next table while resizing. Uses in
* access and update methods are null checked by callers, and
* implicitly bounds-checked, relying on the invariants that tab
@@ -909,7 +909,7 @@ public class ConcurrentHashMapV8
* nonpositive.
*/
public ConcurrentHashMapV8(int initialCapacity,
- float loadFactor, int concurrencyLevel) {
+ float loadFactor, int concurrencyLevel) {
if (!(loadFactor > 0) || initialCapacity < 0 || concurrencyLevel <= 0)
throw new IllegalArgumentException();
this.initCap = initialCapacity;
@@ -1550,8 +1550,7 @@ public class ConcurrentHashMapV8
}
/**
- * Reconstitutes the instance from a
- * stream (i.e., deserializes it).
+ * Reconstitutes the instance from a stream (that is, deserializes it).
* @param s the stream
*/
@SuppressWarnings("unchecked")