|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.semanticweb.elk.util.hashing.HashGenerator
public class HashGenerator
Class used to generate strong hash codes for newly created objects, and for combining multiple hash codes into new ones in various ways.
| Constructor Summary | |
|---|---|
HashGenerator()
|
|
| Method Summary | ||
|---|---|---|
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
|
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
|
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
|
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
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HashGenerator()
| Method Detail |
|---|
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
code
public 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
code
public 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 -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||