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 class
Iterator
that iterates over reachable entries in the map.(package private) final class
Iterator
that iterates over reachable keys in the map.(package private) static class
Soft key that maintains a constant hash and uses referential equality.(package private) final class
Map.Entry
that delegates to the original entry, but maintains a strong reference to the key.(package private) static class
Weak key that maintains a constant hash and uses referential equality. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
clear()
(package private) final void
compact()
Compacts the map by removing cleared keys.final boolean
containsKey
(Object key) final boolean
containsValue
(Object value) entrySet()
final V
final boolean
isEmpty()
keySet()
final V
final void
final V
final int
size()
(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, wait
Methods 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:
containsKey
in interfaceMap<K,
V>
-
containsValue
- Specified by:
containsValue
in 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
Reference
for the given key.
-
tempKey
- Returns:
- Temporary
Reference
for the given key; used in queries.
-
compact
final void compact()Compacts the map by removing cleared keys.
-