T
- the type of object for which hashes are generatedpublic interface Hasher<T> extends Hashing<T>
Implementations of this interface generate hash codes from objects. Depending upon the implementation, null values may be supported.
Modifier and Type | Method and Description |
---|---|
default Hasher<T> |
distinct(int quantity,
HashSize size)
Derives a hasher that produces a fixed quantity of distinct hash codes
within a specified range.
|
default Hasher<T> |
ints()
Derives a hasher that produces an endless stream of hash values in the
range
HashSize.INT_SIZE generated from a single hash value
created by this hasher. |
default Hasher<T> |
longs()
Derives a hasher that produces an endless stream of hash values in the
range
HashSize.LONG_SIZE generated from a single hash value
created by this hasher. |
default Hasher<T> |
sized(HashSize newSize)
Derives a new hasher that generates hash codes within a different
(generally smaller) range.
|
bigHashValue, booleansHasher, bytesHasher, bytesHashValue, charsHasher, digest, digest, digest, doublesHasher, floatsHasher, getQuantity, getSize, hash, identityHasher, intDerivedHasher, intHashValue, intsHasher, longHashValue, longsHasher, MD5, murmur3Int, murmur3Int, objectHasher, prng, prng, prng, SHA_1, SHA_256, shortsHasher
default Hasher<T> sized(HashSize newSize)
newSize
- specifies a size for the derived hasherdefault Hasher<T> distinct(int quantity, HashSize size) throws IllegalArgumentException
quantity
- the number of hash values derived from a single hash code of
this hashersize
- the range over which distinct values will be generatedIllegalArgumentException
- if the size is not integer sized or the quantity is outside
the range [1,size]default Hasher<T> ints()
HashSize.INT_SIZE
generated from a single hash value
created by this hasher. It is recommended that any hasher used to derive
values in this way should have a size which is at least
HashSize.INT_SIZE
.default Hasher<T> longs()
HashSize.LONG_SIZE
generated from a single hash value
created by this hasher. It is recommended that any hasher used to derive
values in this way should have a size which is at least
HashSize.LONG_SIZE
.Copyright © 2010-2016. All Rights Reserved.