|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ehcache.internal.concurrent.ConcurrentHashMap.KeySetView<K,V>
public static class ConcurrentHashMap.KeySetView<K,V>
A view of a ConcurrentHashMap as a Set of keys, in
which additions may optionally be enabled by mapping to a
common value. This class cannot be directly instantiated.
See keySet(),
keySet(V),
newKeySet(),
newKeySet(int).
| Method Summary | ||
|---|---|---|
JSR166Helper.Spliterator<K> |
_spliterator()
|
|
boolean |
add(K e)
Adds the specified key to this set view by mapping the key to the default mapped value in the backing map, if defined. |
|
boolean |
addAll(java.util.Collection<? extends K> c)
Adds all of the elements in the specified collection to this set, as if by calling add(K) on each one. |
|
void |
clear()
Removes all of the elements from this view, by removing all the mappings from the map backing this view. |
|
boolean |
contains(java.lang.Object o)
|
|
boolean |
containsAll(java.util.Collection<?> c)
|
|
boolean |
equals(java.lang.Object o)
|
|
void |
forEach(JSR166Helper.Consumer<? super K> action)
|
|
ConcurrentHashMap<K,V> |
getMap()
Returns the map backing this view. |
|
V |
getMappedValue()
Returns the default mapped value for additions, or null if additions are not supported. |
|
int |
hashCode()
|
|
boolean |
isEmpty()
|
|
java.util.Iterator<K> |
iterator()
Returns an iterator over the elements in this collection. |
|
boolean |
remove(java.lang.Object o)
Removes the key from this map view, by removing the key (and its corresponding value) from the backing map. |
|
boolean |
removeAll(java.util.Collection<?> c)
|
|
boolean |
retainAll(java.util.Collection<?> c)
|
|
int |
size()
|
|
java.lang.Object[] |
toArray()
|
|
|
toArray(T[] a)
|
|
java.lang.String |
toString()
Returns a string representation of this collection. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Set |
|---|
clear, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArray |
| Method Detail |
|---|
public V getMappedValue()
null if additions are not supported.
null
if not supportedpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collection<K>contains in interface java.util.Set<K>java.lang.NullPointerException - if the specified key is nullpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collection<K>remove in interface java.util.Set<K>o - the key to be removed from the backing map
true if the backing map contained the specified key
java.lang.NullPointerException - if the specified key is nullpublic java.util.Iterator<K> iterator()
The returned iterator is weakly consistent.
iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in interface java.util.Set<K>public boolean add(K e)
add in interface java.util.Collection<K>add in interface java.util.Set<K>e - key to be added
true if this set changed as a result of the call
java.lang.NullPointerException - if the specified key is null
java.lang.UnsupportedOperationException - if no default mapped value
for additions was providedpublic boolean addAll(java.util.Collection<? extends K> c)
add(K) on each one.
addAll in interface java.util.Collection<K>addAll in interface java.util.Set<K>c - the elements to be inserted into this set
true if this set changed as a result of the call
java.lang.NullPointerException - if the collection or any of its
elements are null
java.lang.UnsupportedOperationException - if no default mapped value
for additions was providedpublic int hashCode()
hashCode in interface java.util.Collection<K>hashCode in interface java.util.Set<K>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<K>equals in interface java.util.Set<K>equals in class java.lang.Objectpublic JSR166Helper.Spliterator<K> _spliterator()
public void forEach(JSR166Helper.Consumer<? super K> action)
public ConcurrentHashMap<K,V> getMap()
public final void clear()
clear in interface java.util.Collection<E>public final int size()
size in interface java.util.Collection<E>public final boolean isEmpty()
isEmpty in interface java.util.Collection<E>public final java.lang.Object[] toArray()
toArray in interface java.util.Collection<E>public final <T> T[] toArray(T[] a)
toArray in interface java.util.Collection<E>public final java.lang.String toString()
"[]").
Adjacent elements are separated by the characters ", "
(comma and space). Elements are converted to strings as by
String.valueOf(Object).
toString in class java.lang.Objectpublic final boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<E>public final boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<E>public final boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<E>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||