ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ConcurrentHashMap.java (file contents):
Revision 1.154 by jsr166, Thu Dec 27 20:29:07 2012 UTC vs.
Revision 1.155 by dl, Thu Dec 27 20:47:47 2012 UTC

# Line 2367 | Line 2367 | public class ConcurrentHashMap<K, V>
2367              return false;
2368          }
2369  
2370        public int getNaturalSplits() {
2371            return baseLimit > baseIndex ? 1 : 0;
2372        }
2373
2370          public long estimateSize() {
2371              return batch;
2372          }
# Line 2970 | Line 2966 | public class ConcurrentHashMap<K, V>
2966          KeyIterator(ConcurrentHashMap<K, V> map, Traverser<K,V,Object> it) {
2967              super(map, it);
2968          }
2969 <        public KeyIterator<K,V> split() {
2970 <            if (nextKey != null)
2971 <                throw new IllegalStateException();
2969 >        public KeyIterator<K,V> trySplit() {
2970 >            if (tab != null && baseIndex == baseLimit)
2971 >                return null;
2972              return new KeyIterator<K,V>(map, this);
2973          }
2974          @SuppressWarnings("unchecked") public final K next() {
# Line 3001 | Line 2997 | public class ConcurrentHashMap<K, V>
2997          ValueIterator(ConcurrentHashMap<K, V> map, Traverser<K,V,Object> it) {
2998              super(map, it);
2999          }
3000 <        public ValueIterator<K,V> split() {
3001 <            if (nextKey != null)
3002 <                throw new IllegalStateException();
3000 >        public ValueIterator<K,V> trySplit() {
3001 >            if (tab != null && baseIndex == baseLimit)
3002 >                return null;
3003              return new ValueIterator<K,V>(map, this);
3004          }
3005  
# Line 3034 | Line 3030 | public class ConcurrentHashMap<K, V>
3030          EntryIterator(ConcurrentHashMap<K, V> map, Traverser<K,V,Object> it) {
3031              super(map, it);
3032          }
3033 <        public EntryIterator<K,V> split() {
3034 <            if (nextKey != null)
3035 <                throw new IllegalStateException();
3033 >        public EntryIterator<K,V> trySplit() {
3034 >            if (tab != null && baseIndex == baseLimit)
3035 >                return null;
3036              return new EntryIterator<K,V>(map, this);
3037          }
3038  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines