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 class
Iterator
that iterates over reachable entries in the map.(package private) static interface
Represents an inverse mapping from a value to its key.private static final class
Soft value with anMildValues.InverseMapping
back to its key.(package private) final class
Map.Entry
that delegates to the original entry, but maintains a strong reference to the value.(package private) final class
Iterator
that iterates over reachable values in the map.private static final class
Weak value with anMildValues.InverseMapping
back to its key. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
clear()
(package private) void
compact()
Compacts the map by removing cleared values.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 <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, 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
-
MildValues
-
-
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
-
mildValue
- Returns:
- Soft or weak
Reference
for the given key-value mapping.
-
tempValue
- Returns:
- Temporary
Reference
for the given value; used in queries.
-
compact
void compact()Compacts the map by removing cleared values.
-