Package org.apache.pekko.util
Class HashCode
java.lang.Object
org.apache.pekko.util.HashCode
Set of methods which allow easy implementation of
hashCode.
Example:
override def hashCode: Int = {
var result = HashCode.SEED
//collect the contributions of various fields
result = HashCode.hash(result, fPrimitive)
result = HashCode.hash(result, fObject)
result = HashCode.hash(result, fArray)
result
}
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
HashCode
public HashCode()
-
-
Method Details
-
SEED
public static int SEED() -
hash
-
hash
public static int hash(int seed, boolean value) -
hash
public static int hash(int seed, char value) -
hash
public static int hash(int seed, int value) -
hash
public static int hash(int seed, long value) -
hash
public static int hash(int seed, float value) -
hash
public static int hash(int seed, double value)
-