public static class BoundedEquivalentConcurrentHashMapV8.KeySetView<K,V> extends Object implements Set<K>, Serializable
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)
.Modifier and Type | Method and Description |
---|---|
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(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(Object o) |
boolean |
containsAll(Collection<?> c) |
boolean |
equals(Object o) |
void |
forEach(Consumer<? super K> action) |
BoundedEquivalentConcurrentHashMapV8<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() |
Iterator<K> |
iterator()
Returns an iterator over the elements in this collection.
|
boolean |
remove(Object o)
Removes the key from this map view, by removing the key (and its
corresponding value) from the backing map.
|
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
int |
size() |
Spliterator<K> |
spliterator() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
String |
toString()
Returns a string representation of this collection.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
clear, containsAll, isEmpty, removeAll, retainAll, size, toArray, toArray
parallelStream, removeIf, stream
public V getMappedValue()
null
if additions are not supported.null
if not supportedpublic boolean contains(Object o)
contains
in interface Collection<K>
contains
in interface Set<K>
NullPointerException
- if the specified key is nullpublic boolean remove(Object o)
remove
in interface Collection<K>
remove
in interface Set<K>
o
- the key to be removed from the backing maptrue
if the backing map contained the specified keyNullPointerException
- if the specified key is nullpublic Iterator<K> iterator()
The returned iterator is weakly consistent.
public boolean add(K e)
add
in interface Collection<K>
add
in interface Set<K>
e
- key to be addedtrue
if this set changed as a result of the callNullPointerException
- if the specified key is nullUnsupportedOperationException
- if no default mapped value
for additions was providedpublic boolean addAll(Collection<? extends K> c)
add(K)
on each one.addAll
in interface Collection<K>
addAll
in interface Set<K>
c
- the elements to be inserted into this settrue
if this set changed as a result of the callNullPointerException
- if the collection or any of its
elements are null
UnsupportedOperationException
- if no default mapped value
for additions was providedpublic int hashCode()
public boolean equals(Object o)
public Spliterator<K> spliterator()
spliterator
in interface Iterable<K>
spliterator
in interface Collection<K>
spliterator
in interface Set<K>
public BoundedEquivalentConcurrentHashMapV8<K,V> getMap()
public final void clear()
clear
in interface Collection<E>
public final int size()
size
in interface Collection<E>
public final boolean isEmpty()
isEmpty
in interface Collection<E>
public final Object[] toArray()
toArray
in interface Collection<E>
public final <T> T[] toArray(T[] a)
toArray
in interface Collection<E>
public final String toString()
"[]"
).
Adjacent elements are separated by the characters ", "
(comma and space). Elements are converted to strings as by
String.valueOf(Object)
.public final boolean containsAll(Collection<?> c)
containsAll
in interface Collection<E>
public final boolean removeAll(Collection<?> c)
removeAll
in interface Collection<E>
public final boolean retainAll(Collection<?> c)
retainAll
in interface Collection<E>
Copyright © 2017 JBoss, a division of Red Hat. All rights reserved.