Package net.sf.ehcache.util.concurrent
Class ConcurrentHashMap.EntrySetView<K,V>
- java.lang.Object
-
- net.sf.ehcache.util.concurrent.ConcurrentHashMap.EntrySetView<K,V>
-
- All Implemented Interfaces:
java.lang.Iterable<java.util.Map.Entry<K,V>>,java.util.Collection<java.util.Map.Entry<K,V>>,java.util.Set<java.util.Map.Entry<K,V>>
- Enclosing class:
- ConcurrentHashMap<K,V>
public static final class ConcurrentHashMap.EntrySetView<K,V> extends java.lang.Object implements java.util.Set<java.util.Map.Entry<K,V>>A view of a ConcurrentHashMap as aSetof (key, value) entries. This class cannot be directly instantiated. SeeConcurrentHashMap.entrySet.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(java.util.Map.Entry<K,V> e)booleanaddAll(java.util.Collection<? extends java.util.Map.Entry<K,V>> c)voidclear()booleancontains(java.lang.Object o)booleancontainsAll(java.util.Collection<?> c)booleanequals(java.lang.Object o)ConcurrentHashMap<K,V>getMap()Returns the map backing this view.inthashCode()booleanisEmpty()java.util.Iterator<java.util.Map.Entry<K,V>>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.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()
-
-
-
Method Detail
-
contains
public final boolean contains(java.lang.Object o)
-
remove
public final boolean remove(java.lang.Object o)
-
iterator
public final java.util.Iterator<java.util.Map.Entry<K,V>> 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.
-
equals
public boolean equals(java.lang.Object o)
-
getMap
public ConcurrentHashMap<K,V> getMap()
Returns the map backing this view.- Returns:
- the map backing this view
-
size
public final int size()
-
isEmpty
public final boolean isEmpty()
-
clear
public final void clear()
-
toArray
public final java.lang.Object[] toArray()
-
toArray
public final <T> T[] toArray(T[] a)
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public final java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
containsAll
public final boolean containsAll(java.util.Collection<?> c)
-
removeAll
public final boolean removeAll(java.util.Collection<?> c)
-
retainAll
public final boolean retainAll(java.util.Collection<?> c)
-
-