public abstract class HashFunction extends Object implements NamedSPILoader.NamedSPI
BytesRef| Constructor and Description |
|---|
HashFunction(String name) |
| Modifier and Type | Method and Description |
|---|---|
static Set<String> |
availableHashFunctionNames()
returns a list of all available hash function names
|
static HashFunction |
forName(String name)
looks up a hash function by name
|
String |
getName()
Returns this codec's name
|
abstract int |
hash(BytesRef bytes)
Hashes the contents of the referenced bytes
|
String |
toString() |
public HashFunction(String name)
public abstract int hash(BytesRef bytes)
bytes - the data to be hashedpublic final String getName()
getName in interface NamedSPILoader.NamedSPIpublic static HashFunction forName(String name)
public static Set<String> availableHashFunctionNames()
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.