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
HashException
public java.math.BigInteger hash(Metadata data) throws HashException
HashFunction
hash
in interface HashFunction<Metadata>
data
- Data to hash against.HashException
public java.math.BigInteger maxValue()
HashFunction
maxValue
in interface HashFunction<Metadata>
public java.math.BigInteger randomHash()
HashFunction
randomHash
in interface HashFunction<Metadata>