Class HashingStrategies.DoubleFunctionHashingStrategy<T>
- java.lang.Object
-
- org.eclipse.collections.impl.block.factory.HashingStrategies.DoubleFunctionHashingStrategy<T>
-
- All Implemented Interfaces:
java.io.Serializable,HashingStrategy<T>
- Enclosing class:
- HashingStrategies
private static final class HashingStrategies.DoubleFunctionHashingStrategy<T> extends java.lang.Object implements HashingStrategy<T>
-
-
Field Summary
Fields Modifier and Type Field Description private DoubleFunction<? super T>functionprivate static longserialVersionUID
-
Constructor Summary
Constructors Modifier Constructor Description privateDoubleFunctionHashingStrategy(DoubleFunction<? super T> function)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcomputeHashCode(T object)Computes the hashCode of the object as defined by the user.booleanequals(T object1, T object2)Checks two objects for equality.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
function
private final DoubleFunction<? super T> function
-
-
Constructor Detail
-
DoubleFunctionHashingStrategy
private DoubleFunctionHashingStrategy(DoubleFunction<? super T> function)
-
-
Method Detail
-
computeHashCode
public int computeHashCode(T object)
Description copied from interface:HashingStrategyComputes the hashCode of the object as defined by the user.- Specified by:
computeHashCodein interfaceHashingStrategy<T>
-
equals
public boolean equals(T object1, T object2)
Description copied from interface:HashingStrategyChecks 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:
equalsin interfaceHashingStrategy<T>
-
-