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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Unsets the referenced value.MapMakerInternalMap.WeakValueReference<K,V,E>copyFor(java.lang.ref.ReferenceQueue<V> queue, E entry)Returns a freshly createdMapMakerInternalMap.WeakValueReferencefor the givenentry(and on the givenqueuewith the same value as thisMapMakerInternalMap.WeakValueReference.Vget()Returns the current value being referenced, ornullif there is none (e.g.EgetEntry()Returns the entry which contains thisMapMakerInternalMap.WeakValueReference.
-
-
-
Method Detail
-
get
V 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
MapMakerInternalMap.WeakValueReference<K,V,E> copyFor(java.lang.ref.ReferenceQueue<V> queue, E entry)
Returns a freshly createdMapMakerInternalMap.WeakValueReferencefor the givenentry(and on the givenqueuewith the same value as thisMapMakerInternalMap.WeakValueReference.
-
-