ehcache

net.sf.ehcache.util.concurrent
Class ConcurrentHashMap.EntrySetView<K,V>

java.lang.Object
  extended by 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.


Method Summary
 boolean add(Map.Entry<K,V> e)
           
 boolean addAll(Collection<? extends Map.Entry<K,V>> c)
           
 void clear()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object o)
           
 ConcurrentHashMap<K,V> getMap()
          Returns the map backing this view.
 int hashCode()
           
 boolean isEmpty()
           
 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.
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 int size()
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
clear, containsAll, hashCode, isEmpty, removeAll, retainAll, size, toArray, toArray
 

Method Detail

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)

ehcache

Copyright 2001-2015, Terracotta, Inc.