4784 |
|
/** |
4785 |
|
* A view of a ConcurrentHashMapV8 as a {@link Collection} of |
4786 |
|
* values, in which additions are disabled. This class cannot be |
4787 |
< |
* directly instantiated. See {@link #values}, |
4787 |
> |
* directly instantiated. See {@link #values()}. |
4788 |
|
* |
4789 |
|
* <p>The view's {@code iterator} is a "weakly consistent" iterator |
4790 |
|
* that will never throw {@link ConcurrentModificationException}, |
4834 |
|
/** |
4835 |
|
* A view of a ConcurrentHashMapV8 as a {@link Set} of (key, value) |
4836 |
|
* entries. This class cannot be directly instantiated. See |
4837 |
< |
* {@link #entrySet}. |
4837 |
> |
* {@link #entrySet()}. |
4838 |
|
*/ |
4839 |
|
public static final class EntrySetView<K,V> extends CHMView<K,V> |
4840 |
|
implements Set<Map.Entry<K,V>> { |
4870 |
|
} |
4871 |
|
|
4872 |
|
public final boolean add(Entry<K,V> e) { |
4873 |
< |
K key = e.getKey(); |
4874 |
< |
V value = e.getValue(); |
4875 |
< |
if (key == null || value == null) |
4876 |
< |
throw new NullPointerException(); |
4877 |
< |
return map.internalPut(key, value, false) == null; |
4873 |
> |
return map.internalPut(e.getKey(), e.getValue(), false) == null; |
4874 |
|
} |
4875 |
|
public final boolean addAll(Collection<? extends Entry<K,V>> c) { |
4876 |
|
boolean added = false; |