Class CacheEntries<K,V>
- Type Parameters:
K- the type of key objects.V- the type of value objects.
- All Implemented Interfaces:
Iterable<Map.Entry<K,V>>, Collection<Map.Entry<K, V>>, Set<Map.Entry<K, V>>
The set of entries in the
Cache.map. On iteration, handlers will be skipped
and the values of weak references are returned instead of the Reference object.
This class is not needed for the normal working of Cache. it is used only if
the user wants to see the cache entries through the standard Java collection API.
Thread safety
This class is thread-safe if and only if theSet given to the constructor is thread-safe.- Since:
- 0.3
- Version:
- 0.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classAn iterator over the entries in theCache.map. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class AbstractSet
equals, hashCode, removeAllMethods inherited from class AbstractCollection
add, addAll, clear, contains, containsAll, remove, retainAll, toArray, toArray, toStringMethods inherited from interface Collection
parallelStream, removeIf, stream
-
Field Details
-
entries
-
-
Constructor Details
-
CacheEntries
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returnstrueif the set is empty. Overloaded becauseConcurrentHashMaphas a more efficient implementation of this method than testingsize() == 0. -
size
-
iterator
-