Class HashingStrategies.DefaultStrategy

  • All Implemented Interfaces:
    java.io.Serializable, HashingStrategy<java.lang.Object>
    Enclosing class:
    HashingStrategies

    private static class HashingStrategies.DefaultStrategy
    extends java.lang.Object
    implements HashingStrategy<java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DefaultStrategy()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int computeHashCode​(java.lang.Object object)
      Computes the hashCode of the object as defined by the user.
      boolean equals​(java.lang.Object object1, java.lang.Object object2)
      Checks two objects for equality.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultStrategy

        private DefaultStrategy()
    • Method Detail

      • computeHashCode

        public int computeHashCode​(java.lang.Object object)
        Description copied from interface: HashingStrategy
        Computes the hashCode of the object as defined by the user.
        Specified by:
        computeHashCode in interface HashingStrategy<java.lang.Object>
      • equals

        public boolean equals​(java.lang.Object object1,
                              java.lang.Object object2)
        Description copied from interface: HashingStrategy
        Checks two objects for equality. The equality check can use the objects own equals() method or a custom method defined by the user. It should be consistent with the computeHashCode() method.
        Specified by:
        equals in interface HashingStrategy<java.lang.Object>