--- jsr166/src/jsr166e/ConcurrentHashMapV8.java 2013/02/11 20:52:00 1.98 +++ jsr166/src/jsr166e/ConcurrentHashMapV8.java 2013/02/15 22:20:46 1.99 @@ -212,8 +212,8 @@ import java.io.Serializable; * @param the type of keys maintained by this map * @param the type of mapped values */ -public class ConcurrentHashMapV8 - implements ConcurrentMap, Serializable { +public class ConcurrentHashMapV8 + implements ConcurrentMap, Serializable { private static final long serialVersionUID = 7249069246763182397L; /** @@ -2279,7 +2279,7 @@ public class ConcurrentHashMapV8 */ @SuppressWarnings("serial") static class Traverser extends CountedCompleter { - final ConcurrentHashMapV8 map; + final ConcurrentHashMapV8 map; Node next; // the next entry to use Object nextKey; // cached key field of next V nextVal; // cached val field of next @@ -2291,7 +2291,7 @@ public class ConcurrentHashMapV8 int batch; // split control /** Creates iterator for all entries in the table. */ - Traverser(ConcurrentHashMapV8 map) { + Traverser(ConcurrentHashMapV8 map) { this.map = map; } @@ -2323,7 +2323,7 @@ public class ConcurrentHashMapV8 if (e != null) // advance past used/skipped node e = e.next; while (e == null) { // get to next non-null bin - ConcurrentHashMapV8 m; + ConcurrentHashMapV8 m; Node[] t; int b, i, n; Object ek; // must use locals if ((t = tab) != null) n = t.length; @@ -2376,7 +2376,7 @@ public class ConcurrentHashMapV8 * anyway. */ final int preSplit() { - ConcurrentHashMapV8 m; int b; Node[] t; ForkJoinPool pool; + ConcurrentHashMapV8 m; int b; Node[] t; ForkJoinPool pool; if ((b = batch) < 0 && (m = map) != null) { // force initialization if ((t = tab) == null && (t = tab = m.table) != null) baseLimit = baseSize = t.length; @@ -2687,7 +2687,7 @@ public class ConcurrentHashMapV8 * memoized result, as in: * *
 {@code
-     * map.computeIfAbsent(key, new Fun() {
+     * map.computeIfAbsent(key, new Fun() {
      *   public V map(K k) { return new Value(f(k)); }});}
* * @param key key with which the specified value is to be associated @@ -3068,8 +3068,8 @@ public class ConcurrentHashMapV8 @SuppressWarnings("serial") static final class KeyIterator extends Traverser implements Spliterator, Enumeration { - KeyIterator(ConcurrentHashMapV8 map) { super(map); } - KeyIterator(ConcurrentHashMapV8 map, Traverser it) { + KeyIterator(ConcurrentHashMapV8 map) { super(map); } + KeyIterator(ConcurrentHashMapV8 map, Traverser it) { super(map, it, -1); } public KeyIterator split() { @@ -3091,8 +3091,8 @@ public class ConcurrentHashMapV8 @SuppressWarnings("serial") static final class ValueIterator extends Traverser implements Spliterator, Enumeration { - ValueIterator(ConcurrentHashMapV8 map) { super(map); } - ValueIterator(ConcurrentHashMapV8 map, Traverser it) { + ValueIterator(ConcurrentHashMapV8 map) { super(map); } + ValueIterator(ConcurrentHashMapV8 map, Traverser it) { super(map, it, -1); } public ValueIterator split() { @@ -3115,8 +3115,8 @@ public class ConcurrentHashMapV8 @SuppressWarnings("serial") static final class EntryIterator extends Traverser implements Spliterator> { - EntryIterator(ConcurrentHashMapV8 map) { super(map); } - EntryIterator(ConcurrentHashMapV8 map, Traverser it) { + EntryIterator(ConcurrentHashMapV8 map) { super(map); } + EntryIterator(ConcurrentHashMapV8 map, Traverser it) { super(map, it, -1); } public EntryIterator split() { @@ -3138,11 +3138,11 @@ public class ConcurrentHashMapV8 /** * Exported Entry for iterators */ - static final class MapEntry implements Map.Entry { + static final class MapEntry implements Map.Entry { final K key; // non-null V val; // non-null - final ConcurrentHashMapV8 map; - MapEntry(K key, V val, ConcurrentHashMapV8 map) { + final ConcurrentHashMapV8 map; + MapEntry(K key, V val, ConcurrentHashMapV8 map) { this.key = key; this.val = val; this.map = map; @@ -4578,9 +4578,9 @@ public class ConcurrentHashMapV8 /** * Base class for views. */ - abstract static class CHMView { - final ConcurrentHashMapV8 map; - CHMView(ConcurrentHashMapV8 map) { this.map = map; } + abstract static class CHMView { + final ConcurrentHashMapV8 map; + CHMView(ConcurrentHashMapV8 map) { this.map = map; } /** * Returns the map backing this view. @@ -4722,7 +4722,7 @@ public class ConcurrentHashMapV8 implements Set, java.io.Serializable { private static final long serialVersionUID = 7249069246763182397L; private final V value; - KeySetView(ConcurrentHashMapV8 map, V value) { // non-public + KeySetView(ConcurrentHashMapV8 map, V value) { // non-public super(map); this.value = value; } @@ -4790,7 +4790,7 @@ public class ConcurrentHashMapV8 */ public static final class ValuesView extends CHMView implements Collection { - ValuesView(ConcurrentHashMapV8 map) { super(map); } + ValuesView(ConcurrentHashMapV8 map) { super(map); } public final boolean contains(Object o) { return map.containsValue(o); } public final boolean remove(Object o) { if (o != null) { @@ -4834,7 +4834,7 @@ public class ConcurrentHashMapV8 */ public static final class EntrySetView extends CHMView implements Set> { - EntrySetView(ConcurrentHashMapV8 map) { super(map); } + EntrySetView(ConcurrentHashMapV8 map) { super(map); } public final boolean contains(Object o) { Object k, v, r; Map.Entry e; return ((o instanceof Map.Entry) &&