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 |
|
} |
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() { |
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 |
|
|
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 |
|
|