Class ConcurrentHashMapV8.CollectionView<K,V,E>
- java.lang.Object
-
- org.glassfish.jersey.internal.util.collection.ConcurrentHashMapV8.CollectionView<K,V,E>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Iterable<E>,java.util.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 java.lang.Object implements java.util.Collection<E>, java.io.SerializableBase class for views.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) ConcurrentHashMapV8<K,V>mapprivate static java.lang.StringoomeMsgprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description CollectionView(ConcurrentHashMapV8<K,V> map)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclear()Removes all of the elements from this view, by removing all the mappings from the map backing this view.abstract booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)ConcurrentHashMapV8<K,V>getMap()Returns the map backing this view.booleanisEmpty()abstract java.util.Iterator<E>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 booleanremove(java.lang.Object o)booleanremoveAll(java.util.Collection<?> c)booleanretainAll(java.util.Collection<?> c)intsize()java.lang.Object[]toArray()<T> T[]toArray(T[] a)java.lang.StringtoString()Returns a string representation of this collection.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
map
final ConcurrentHashMapV8<K,V> map
-
oomeMsg
private static final java.lang.String oomeMsg
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CollectionView
CollectionView(ConcurrentHashMapV8<K,V> map)
-
-
Method Detail
-
getMap
public ConcurrentHashMapV8<K,V> 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 interfacejava.util.Collection<K>
-
size
public final int size()
- Specified by:
sizein interfacejava.util.Collection<K>
-
isEmpty
public final boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<K>
-
iterator
public abstract java.util.Iterator<E> 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
public abstract boolean contains(java.lang.Object o)
- Specified by:
containsin interfacejava.util.Collection<K>
-
remove
public abstract boolean remove(java.lang.Object o)
- Specified by:
removein interfacejava.util.Collection<K>
-
toArray
public final java.lang.Object[] toArray()
- Specified by:
toArrayin interfacejava.util.Collection<K>
-
toArray
public final <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfacejava.util.Collection<K>
-
toString
public final java.lang.String 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).- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of this collection
-
containsAll
public final boolean containsAll(java.util.Collection<?> c)
- Specified by:
containsAllin interfacejava.util.Collection<K>
-
removeAll
public final boolean removeAll(java.util.Collection<?> c)
- Specified by:
removeAllin interfacejava.util.Collection<K>
-
retainAll
public final boolean retainAll(java.util.Collection<?> c)
- Specified by:
retainAllin interfacejava.util.Collection<K>
-
-