Class HybrisWeakReference


  • public class HybrisWeakReference
    extends java.lang.ref.WeakReference
    This subclass of WeakReference does implement equals and hashCode so it can be used in sets. The hashCode is taken from the references Object at creation time so it is fixed. Equals compares the hashCode which is the hashCode of the referenced object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      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
    • Constructor Detail

      • HybrisWeakReference

        public HybrisWeakReference​(java.lang.Object o)
      • HybrisWeakReference

        public HybrisWeakReference​(java.lang.Object o,
                                   java.lang.ref.ReferenceQueue queue)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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