Package org.eclipse.sisu.inject
Class MildValues<K,V>
java.lang.Object
org.eclipse.sisu.inject.MildValues<K,V>
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
MildConcurrentValues
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final classIteratorthat iterates over reachable entries in the map.(package private) static interfaceRepresents an inverse mapping from a value to its key.private static final classSoft value with anMildValues.InverseMappingback to its key.(package private) final classMap.Entrythat delegates to the original entry, but maintains a strong reference to the value.(package private) final classIteratorthat iterates over reachable values in the map.private static final classWeak value with anMildValues.InverseMappingback to its key. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclear()(package private) voidcompact()Compacts the map by removing cleared values.final booleancontainsKey(Object key) final booleancontainsValue(Object value) entrySet()final Vfinal booleanisEmpty()keySet()final Vfinal voidfinal Vfinal intsize()(package private) static final <V> Reference<V> tempValue(V value) final Collection<V> values()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Field Details
-
queue
-
map
-
soft
private final boolean soft
-
-
Constructor Details
-
MildValues
-
-
Method Details
-
containsKey
- Specified by:
containsKeyin interfaceMap<K,V>
-
containsValue
- Specified by:
containsValuein interfaceMap<K,V>
-
get
-
put
-
putAll
-
remove
-
clear
public final void clear() -
isEmpty
public final boolean isEmpty() -
size
public final int size() -
keySet
-
values
-
entrySet
-
mildValue
- Returns:
- Soft or weak
Referencefor the given key-value mapping.
-
tempValue
- Returns:
- Temporary
Referencefor the given value; used in queries.
-
compact
void compact()Compacts the map by removing cleared values.
-