Package org.eclipse.sisu.inject
Class MildKeys<K,V>
java.lang.Object
org.eclipse.sisu.inject.MildKeys<K,V>
- All Implemented Interfaces:
Map<K,V>
- Direct Known Subclasses:
MildConcurrentKeys
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) final classIteratorthat iterates over reachable entries in the map.(package private) final classIteratorthat iterates over reachable keys in the map.(package private) static classSoft key that maintains a constant hash and uses referential equality.(package private) final classMap.Entrythat delegates to the original entry, but maintains a strong reference to the key.(package private) static classWeak key that maintains a constant hash and uses referential equality. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidclear()(package private) final voidcompact()Compacts the map by removing cleared keys.final booleancontainsKey(Object key) final booleancontainsValue(Object value) entrySet()final Vfinal booleanisEmpty()keySet()final Vfinal voidfinal Vfinal intsize()(package private) static final <K> Reference<K>tempKey(K key) 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
-
MildKeys
-
-
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
-
mildKey
- Returns:
- Soft or weak
Referencefor the given key.
-
tempKey
- Returns:
- Temporary
Referencefor the given key; used in queries.
-
compact
final void compact()Compacts the map by removing cleared keys.
-