Interface HashingStrategy<E>

All Superinterfaces:
Serializable
All Known Implementing Classes:
HashingStrategies.BooleanFunctionHashingStrategy, HashingStrategies.ByteFunctionHashingStrategy, HashingStrategies.ChainedHashingStrategy, HashingStrategies.CharFunctionHashingStrategy, HashingStrategies.DefaultStrategy, HashingStrategies.DoubleFunctionHashingStrategy, HashingStrategies.FloatFunctionHashingStrategy, HashingStrategies.FunctionHashingStrategy, HashingStrategies.IdentityHashingStrategy, HashingStrategies.IntFunctionHashingStrategy, HashingStrategies.LongFunctionHashingStrategy, HashingStrategies.NullSafeFunctionHashingStrategy, HashingStrategies.NullSafeHashingStrategy, HashingStrategies.ShortFunctionHashingStrategy

public interface HashingStrategy<E> extends Serializable
Interface for supporting user defined hashing strategies in Sets and Maps
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Computes the hashCode of the object as defined by the user.
    boolean
    equals(E object1, E object2)
    Checks two objects for equality.
  • Method Details

    • computeHashCode

      int computeHashCode(E object)
      Computes the hashCode of the object as defined by the user.
    • equals

      boolean equals(E object1, E object2)
      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.