ConcurrentHashMap.KeySetView

public static class ConcurrentHashMap.KeySetView extends Object
implements Collection<K> Serializable Set<K> Serializable

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(V), newKeySet(), newKeySet(int).

Public Method Summary

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(E) on each one.
final 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)
Returns true if this collection contains the specified element.
final boolean
containsAll(Collection<?> c)
Returns true if this collection contains all of the elements in the specified collection.
boolean
equals(Object o)
Compares this instance with the specified object and indicates if they are equal.
void
forEach(Consumer<? super K> action)