public class ConstrainedGeohash extends java.lang.Object implements HashFunction<Metadata>
| Constructor and Description |
|---|
ConstrainedGeohash(java.lang.String[] geohashes) |
| Modifier and Type | Method and Description |
|---|---|
java.math.BigInteger |
hash(Metadata data)
Maps some given data to an integer location in the implemented hash
space.
|
java.math.BigInteger |
maxValue()
Determines the maximum hash value that this hash function can produce.
|
java.math.BigInteger |
randomHash()
Returns a random location in the hash space.
|
public ConstrainedGeohash(java.lang.String[] geohashes)
throws HashException
HashExceptionpublic java.math.BigInteger hash(Metadata data) throws HashException
HashFunctionhash in interface HashFunction<Metadata>data - Data to hash against.HashExceptionpublic java.math.BigInteger maxValue()
HashFunctionmaxValue in interface HashFunction<Metadata>public java.math.BigInteger randomHash()
HashFunctionrandomHash in interface HashFunction<Metadata>