T
- the type of objects for which hashes may be generatedpublic interface Hash<T>
Implementations of this interface can generate one hash value for a given object. Depending upon the implementation, null values may be supported.
Modifier and Type | Method and Description |
---|---|
HashRange |
getRange() |
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© 2018 The RRD4J Authors. © 2001-2005 Sasa Markovic and Ciaran Treanor. © 2018 The OpenNMS Group, Inc.