Package org.jppf.utils.collections
Class SoftReferenceValuesMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
org.jppf.utils.collections.SoftReferenceValuesMap<K,V>
- Type Parameters:
K- the type of the keys.V- the type of the values.
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
ConcurrentSoftReferenceValuesMap,SoftLRUCache
Map whose values are soft references. When a value has been garbage-collected,
the corresponding map entry is removed.
- Author:
- Laurent Cohen
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SoftReferenceValuesMap(int capacity) Default constructor. -
Method Summary
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, hashCode, putAll, toString, valuesMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
SoftReferenceValuesMap
public SoftReferenceValuesMap()Default constructor. -
SoftReferenceValuesMap
public SoftReferenceValuesMap(int capacity) Default constructor.- Parameters:
capacity- an optional maximum capacity.
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
get
-
put
-
remove
-
entrySet
-
clear
public void clear() -
keySet
-