Class HashingStrategies.FunctionHashingStrategy<T,V>

java.lang.Object
org.eclipse.collections.impl.block.factory.HashingStrategies.FunctionHashingStrategy<T,V>
All Implemented Interfaces:
Serializable, HashingStrategy<T>
Enclosing class:
HashingStrategies

private static final class HashingStrategies.FunctionHashingStrategy<T,V> extends Object implements HashingStrategy<T>
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • function

      private final Function<? super T,? extends V> function
  • Constructor Details

    • FunctionHashingStrategy

      private FunctionHashingStrategy(Function<? super T,? extends V> function)
  • Method Details

    • computeHashCode

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

      public boolean equals(T object1, T 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<T>