public class HashGenerator extends Object
| Constructor and Description |
|---|
HashGenerator() |
| Modifier and Type | Method and Description |
|---|---|
static int |
combinedHashCode(Iterable<?> objects)
Compute the combined hash code of several objects using their
Object.hashCode() functions. |
static int |
combinedHashCode(Object... objects)
Compute the combined hash code of several objects using their
Object.hashCode() functions. |
static int |
combineListHash(int... hashes)
Combine many hash codes into one in a way that depends on their order.
|
static <T> int |
combineListHash(Iterator<? extends T> hashObjectIterator,
Hasher<T> hasher)
Combine the hash codes of a collection of objects into one in a way that
depends on their order.
|
static <T> int |
combineListHash(List<? extends T> hashObjects,
Hasher<T> hasher)
Combine the hash codes of a collection of objects into one in a way that
depends on their order.
|
static int |
combineMultisetHash(boolean finalize,
int... hashes)
Combine many hash codes with an associative commutative hash function.
|
static <T> int |
combineMultisetHash(boolean finalize,
Iterable<? extends T> hashObjects,
Hasher<T> hasher)
Combine the hash codes of a collection of objects with an associative
commutative hash function.
|
static <T> int |
combineMultisetHash(boolean finalize,
Iterator<? extends T> hashObjectIterator,
Hasher<T> hasher)
Combine the hash codes of a collection of objects with an associative
commutative hash function.
|
static int |
generateNextHashCode()
Generate a new "hash code" integer.
|
public static int generateNextHashCode()
public static int combinedHashCode(Object... objects)
Object.hashCode() functions. The combined hash code depends on the
order in which the objects are listed.
The current implementation is based on the Jenkins One-at-a-Time hash,
see http://www.burtleburtle.net/bob/hash/doobs.html and also
http://en.wikipedia.org/wiki/Jenkins_hash_function.objects - the list of objects for which to compute the combined hash
codepublic static int combinedHashCode(Iterable<?> objects)
Object.hashCode() functions. The combined hash code depends on the
order in which the objects are listed.
The current implementation is based on the Jenkins One-at-a-Time hash,
see http://www.burtleburtle.net/bob/hash/doobs.html and also
http://en.wikipedia.org/wiki/Jenkins_hash_function.objects - the list of objects for which to compute the combined hash
codepublic static int combineMultisetHash(boolean finalize,
int... hashes)
finalize - hashes - public static <T> int combineMultisetHash(boolean finalize,
Iterable<? extends T> hashObjects,
Hasher<T> hasher)
finalize - hashObjects - hasher - public static <T> int combineMultisetHash(boolean finalize,
Iterator<? extends T> hashObjectIterator,
Hasher<T> hasher)
T - finalize - hashObjectIterator - hasher - public static int combineListHash(int... hashes)
hashes - public static <T> int combineListHash(List<? extends T> hashObjects, Hasher<T> hasher)
hashObjects - hasher - public static <T> int combineListHash(Iterator<? extends T> hashObjectIterator, Hasher<T> hasher)
hashObjectIterator - hasher - Copyright © 2011-2015 Department of Computer Science, University of Oxford. All Rights Reserved.