T - the type of objects for which hashes may be generatedpublic interface Hash<T>| Modifier and Type | Method and Description |
|---|---|
HashRange | getRange()Returns the hash range for this hash function. |
BigInteger | hashAsBigInt(T value)The hash value as a BigInteger. |
int | hashAsInt(T value)The hash value as an int. |
long | hashAsLong(T value)The hash value as a long. |
HashRange getRange()
BigInteger hashAsBigInt(T value) throws IllegalArgumentException
BigInteger. This method may be useful in circumstances where the
generated hash is too large to be accomodated in a single primitive value, eg. if
cryptographic hashes are being used.value - the object to be hashedIllegalArgumentException - if the value cannot be hashedint hashAsInt(T value) throws IllegalArgumentException
HashRange.value - the object to be hashedIllegalArgumentException - if the value cannot be hashedlong hashAsLong(T value) throws IllegalArgumentException
HashRange.value - the object to be hashedIllegalArgumentException - if the value cannot be hashed