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:
- Iterable<Map.Entry<K,V>>, Collection<Map.Entry<K,V>>, Set<Map.Entry<K,V>>
- Enclosing class:
- ConcurrentHashMap<K,V>
public static final class ConcurrentHashMap.EntrySetView<K,V>
- extends Object
- implements Set<Map.Entry<K,V>>
A view of a ConcurrentHashMap as a Set of (key, value)
entries. This class cannot be directly instantiated. See
ConcurrentHashMap.entrySet.
contains
public final boolean contains(Object o)
- Specified by:
contains in interface Collection<Map.Entry<K,V>>- Specified by:
contains in interface Set<Map.Entry<K,V>>
remove
public final boolean remove(Object o)
- Specified by:
remove in interface Collection<Map.Entry<K,V>>- Specified by:
remove in interface Set<Map.Entry<K,V>>
iterator
public final Iterator<Map.Entry<K,V>> iterator()
- Returns a "weakly consistent" iterator that will never
throw
ConcurrentModificationException, 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.
- Specified by:
iterator in interface Iterable<Map.Entry<K,V>>- Specified by:
iterator in interface Collection<Map.Entry<K,V>>- Specified by:
iterator in interface Set<Map.Entry<K,V>>
- Returns:
- an iterator over the entries of this map
add
public final boolean add(Map.Entry<K,V> e)
- Specified by:
add in interface Collection<Map.Entry<K,V>>- Specified by:
add in interface Set<Map.Entry<K,V>>
addAll
public final boolean addAll(Collection<? extends Map.Entry<K,V>> c)
- Specified by:
addAll in interface Collection<Map.Entry<K,V>>- Specified by:
addAll in interface Set<Map.Entry<K,V>>
equals
public boolean equals(Object o)
- Specified by:
equals in interface Collection<Map.Entry<K,V>>- Specified by:
equals in interface Set<Map.Entry<K,V>>- Overrides:
equals in class Object
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 Object[] toArray()
toArray
public final <T> T[] toArray(T[] a)
hashCode
public final int hashCode()
- Overrides:
hashCode in class Object
toString
public final String toString()
- Overrides:
toString in class Object
containsAll
public final boolean containsAll(Collection<?> c)
removeAll
public final boolean removeAll(Collection<?> c)
retainAll
public final boolean retainAll(Collection<?> c)
Copyright 2001-2017, Terracotta, Inc.