Package com.google.common.collect
Interface MapMakerInternalMap.WeakValueReference<K,V,E extends MapMakerInternalMap.InternalEntry<K,V,E>>
- All Known Implementing Classes:
MapMakerInternalMap.WeakValueReferenceImpl
- Enclosing class:
- MapMakerInternalMap<K,
V, E extends MapMakerInternalMap.InternalEntry<K, V, E>, S extends MapMakerInternalMap.Segment<K, V, E, S>>
static interface MapMakerInternalMap.WeakValueReference<K,V,E extends MapMakerInternalMap.InternalEntry<K,V,E>>
A weakly referenced value that also has a reference to its containing entry.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Unsets the referenced value.copyFor(ReferenceQueue<V> queue, E entry) Returns a freshly createdMapMakerInternalMap.WeakValueReferencefor the givenentry(and on the givenqueue) with the same value as thisMapMakerInternalMap.WeakValueReference.get()Returns the current value being referenced, ornullif there is none (e.g.getEntry()Returns the entry which contains thisMapMakerInternalMap.WeakValueReference.
-
Method Details
-
get
Returns the current value being referenced, ornullif there is none (e.g. because either it got collected, orclear()was called, or it wasn't set in the first place). -
getEntry
E getEntry()Returns the entry which contains thisMapMakerInternalMap.WeakValueReference. -
clear
void clear()Unsets the referenced value. Subsequent calls toget()will returnnull. -
copyFor
Returns a freshly createdMapMakerInternalMap.WeakValueReferencefor the givenentry(and on the givenqueue) with the same value as thisMapMakerInternalMap.WeakValueReference.
-