Class ConcurrentHashMapV8.CollectionView<K,V,E>
java.lang.Object
org.glassfish.jersey.internal.util.collection.ConcurrentHashMapV8.CollectionView<K,V,E>
- All Implemented Interfaces:
Serializable, Iterable<E>, Collection<E>
- Direct Known Subclasses:
ConcurrentHashMapV8.EntrySetView, ConcurrentHashMapV8.KeySetView, ConcurrentHashMapV8.ValuesView
- Enclosing class:
ConcurrentHashMapV8<K,V>
abstract static class ConcurrentHashMapV8.CollectionView<K,V,E>
extends Object
implements Collection<E>, Serializable
Base class for views.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ConcurrentHashMapV8<K, V> private static final Stringprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclear()Removes all of the elements from this view, by removing all the mappings from the map backing this view.abstract booleanfinal booleancontainsAll(Collection<?> c) getMap()Returns the map backing this view.final booleanisEmpty()iterator()Returns a "weakly consistent" iterator that will never throwConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction.abstract booleanfinal booleanremoveAll(Collection<?> c) final booleanretainAll(Collection<?> c) final intsize()final Object[]toArray()final <T> T[]toArray(T[] a) final StringtoString()Returns a string representation of this collection.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Collection
add, addAll, equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
map
-
oomeMsg
- See Also:
-
-
Constructor Details
-
CollectionView
CollectionView(ConcurrentHashMapV8<K, V> map)
-
-
Method Details
-
getMap
Returns the map backing this view.- Returns:
- the map backing this view
-
clear
public final void clear()Removes all of the elements from this view, by removing all the mappings from the map backing this view.- Specified by:
clearin interfaceCollection<K>
-
size
public final int size()- Specified by:
sizein interfaceCollection<K>
-
isEmpty
public final boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<K>
-
iterator
Returns a "weakly consistent" iterator that will never throwConcurrentModificationException, and guarantees to traverse elements as they existed upon construction of the iterator, and may (but is not guaranteed to) reflect any modifications subsequent to construction. -
contains
- Specified by:
containsin interfaceCollection<K>
-
remove
- Specified by:
removein interfaceCollection<K>
-
toArray
- Specified by:
toArrayin interfaceCollection<K>
-
toArray
public final <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<K>
-
toString
Returns a string representation of this collection. The string representation consists of the string representations of the collection's elements in the order they are returned by its iterator, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters", "(comma and space). Elements are converted to strings as byString.valueOf(Object). -
containsAll
- Specified by:
containsAllin interfaceCollection<K>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K>
-