Class AbstractHashable


  • public abstract class AbstractHashable
    extends java.lang.Object
    If you want your class to behave correctly when used in Maps or Sets, you can do this by:
    1. Extending this class
    2. Ensuring that all used field types implement equals() and hashCode() (e.g. by extending this class)
    • Method Summary

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

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AbstractHashable

        public AbstractHashable()
    • Method Detail

      • equals

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object