|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lucene.util.hash.HashFunction
public abstract class HashFunction
Base class for hashing functions that can be referred to by name.
Subclasses are expected to provide threadsafe implementations of the hash function
on the range of bytes referenced in the provided BytesRef
Constructor Summary | |
---|---|
HashFunction(String name)
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HashFunction(String name)
Method Detail |
---|
public abstract int hash(BytesRef bytes)
bytes
- the data to be hashed
public final String getName()
getName
in interface NamedSPILoader.NamedSPI
public static HashFunction forName(String name)
public static Set<String> availableHashFunctionNames()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |