OBJECT
- Type of object being hashedpublic class SimpleComposition<OBJECT> extends HashComposition<OBJECT>
HashCodeUtil
for int arrays.hashFunctions
Constructor and Description |
---|
SimpleComposition(HashFunction<OBJECT> first,
HashFunction<OBJECT>... remainder)
Construct with the given functions.
|
SimpleComposition(HashFunctionFactory<OBJECT> factory,
int nFuncs)
Construct with the factory which is used to produce the required number
of functions.
|
SimpleComposition(List<HashFunction<OBJECT>> functions)
Construct with the given functions.
|
Modifier and Type | Method and Description |
---|---|
int |
computeHashCode(OBJECT object)
Compute the hash code for the object
|
public SimpleComposition(List<HashFunction<OBJECT>> functions)
functions
- the underlying hash functions.@SafeVarargs public SimpleComposition(HashFunction<OBJECT> first, HashFunction<OBJECT>... remainder)
first
- the first functionremainder
- the remainder of the functionspublic SimpleComposition(HashFunctionFactory<OBJECT> factory, int nFuncs)
factory
- the factory to use to produce the underlying hash functions.nFuncs
- the number of functions to create for the compositionpublic int computeHashCode(OBJECT object)
HashFunction
object
- the object