--- jsr166/src/jsr166e/ConcurrentHashMapV8.java 2012/07/04 20:10:00 1.42 +++ jsr166/src/jsr166e/ConcurrentHashMapV8.java 2012/07/07 13:01:53 1.50 @@ -105,7 +105,7 @@ public class ConcurrentHashMapV8 */ public static interface MappingFunction { /** - * Returns a value for the given key, or null if there is no mapping + * Returns a value for the given key, or null if there is no mapping. * * @param key the (non-null) key * @return a value for the key, or null if none @@ -145,8 +145,8 @@ public class ConcurrentHashMapV8 * framework. As illustrated here, Spliterators are well suited to * designs in which a task repeatedly splits off half its work * into forked subtasks until small enough to process directly, - * and then joins these subtasks. Variants of this style can be - * also be used in completion-based designs. + * and then joins these subtasks. Variants of this style can also + * be used in completion-based designs. * *
      * {@code ConcurrentHashMapV8 m = ...
@@ -192,21 +192,9 @@ public class ConcurrentHashMapV8
          * @return a Spliterator covering approximately half of the
          * elements
          * @throws IllegalStateException if this Spliterator has
-         * already commenced traversing elements.
+         * already commenced traversing elements
          */
         Spliterator split();
-
-        /**
-         * Returns a Spliterator producing the same elements as this
-         * Spliterator. This method may be used for example to create
-         * a second Spliterator before a traversal, in order to later
-         * perform a second traversal.
-         *
-         * @return a Spliterator covering the same range as this Spliterator.
-         * @throws IllegalStateException if this Spliterator has
-         * already commenced traversing elements.
-         */
-        Spliterator clone();
     }
 
     /*
@@ -806,7 +794,7 @@ public class ConcurrentHashMapV8
         }
 
         /**
-         * Find or add a node
+         * Finds or adds a node.
          * @return null if added
          */
         @SuppressWarnings("unchecked") // suppress Comparable cast warning
@@ -2012,8 +2000,8 @@ public class ConcurrentHashMapV8
     }
 
     /**
-     * Split a normal bin with list headed by e into lo and hi parts;
-     * install in given table
+     * Splits a normal bin with list headed by e into lo and hi parts;
+     * installs in given table.
      */
     private static void splitBin(Node[] nextTab, int i, Node e) {
         int bit = nextTab.length >>> 1; // bit to split on
@@ -2043,7 +2031,7 @@ public class ConcurrentHashMapV8
     }
 
     /**
-     * Split a tree bin into lo and hi parts; install in given table
+     * Splits a tree bin into lo and hi parts; installs in given table.
      */
     private static void splitTreeBin(Node[] nextTab, int i, TreeBin t) {
         int bit = nextTab.length >>> 1;
@@ -2199,7 +2187,7 @@ public class ConcurrentHashMapV8
             baseLimit = baseSize = (tab == null) ? 0 : tab.length;
         }
 
-        /** Creates iterator for clone() and split() methods */
+        /** Creates iterator for clone() and split() methods. */
         InternalIterator(InternalIterator it, boolean split) {
             this.map = it.map;
             this.tab = it.tab;
@@ -2211,7 +2199,7 @@ public class ConcurrentHashMapV8
         }
 
         /**
-         * Advances next; returns nextVal or null if terminated
+         * Advances next; returns nextVal or null if terminated.
          * See above for explanation.
          */
         final Object advance() {
@@ -2261,7 +2249,7 @@ public class ConcurrentHashMapV8
     /* ---------------- Public operations -------------- */
 
     /**
-     * Creates a new, empty map with the default initial table size (16),
+     * Creates a new, empty map with the default initial table size (16).
      */
     public ConcurrentHashMapV8() {
         this.counter = new LongAdder();
@@ -2342,8 +2330,8 @@ public class ConcurrentHashMapV8
         if (initialCapacity < concurrencyLevel)   // Use at least as many bins
             initialCapacity = concurrencyLevel;   // as estimated threads
         long size = (long)(1.0 + (long)initialCapacity / loadFactor);
-        int cap = ((size >= (long)MAXIMUM_CAPACITY) ?
-                   MAXIMUM_CAPACITY: tableSizeFor((int)size));
+        int cap = (size >= (long)MAXIMUM_CAPACITY) ?
+            MAXIMUM_CAPACITY : tableSizeFor((int)size);
         this.counter = new LongAdder();
         this.sizeCtl = cap;
     }
@@ -2952,8 +2940,8 @@ public class ConcurrentHashMapV8
 
         /**
          * Sets our entry's value and writes through to the map. The
-         * value to return is somewhat arbitrary here. Since a we do
-         * not necessarily track asynchronous changes, the most recent
+         * value to return is somewhat arbitrary here. Since we do not
+         * necessarily track asynchronous changes, the most recent
          * "previous" value could be different from what we return (or
          * could even have been removed in which case the put will
          * re-establish). We do not and cannot guarantee more.