Class Functions.WeakMemoizer.MappedReference<K,​V>

  • Enclosing class:
    Functions.WeakMemoizer<A,​B>

    static final class Functions.WeakMemoizer.MappedReference<K,​V>
    extends java.lang.ref.WeakReference<V>
    A weak reference that maintains a reference to the key so that it can be removed from the map when the value is garbage collected.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private K key  
    • Constructor Summary

      Constructors 
      Constructor Description
      MappedReference​(K key, V value, java.lang.ref.ReferenceQueue<? super V> q)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) K getDescriptor()  
      • Methods inherited from class java.lang.ref.Reference

        clear, clone, enqueue, get, isEnqueued, reachabilityFence
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • key

        private final K key
    • Constructor Detail

      • MappedReference

        public MappedReference​(K key,
                               V value,
                               java.lang.ref.ReferenceQueue<? super V> q)
    • Method Detail

      • getDescriptor

        final K getDescriptor()