Class MildKeys.Weak<T>

  • Direct Known Subclasses:
    MildValues.Weak
    Enclosing class:
    MildKeys<K,​V>

    static class MildKeys.Weak<T>
    extends java.lang.ref.WeakReference<T>
    Weak key that maintains a constant hash and uses referential equality.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hash  
    • Constructor Summary

      Constructors 
      Constructor Description
      Weak​(T o, java.lang.ref.ReferenceQueue<T> queue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object rhs)  
      int hashCode()  
      • Methods inherited from class java.lang.ref.Reference

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

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

      • hash

        private final int hash
    • Constructor Detail

      • Weak

        Weak​(T o,
             java.lang.ref.ReferenceQueue<T> queue)
    • Method Detail

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public final boolean equals​(java.lang.Object rhs)
        Overrides:
        equals in class java.lang.Object