Package org.apache.lucene.codecs.bloom

# Class HashFunction

java.lang.Object
org.apache.lucene.codecs.bloom.HashFunction

Direct Known Subclasses:
  `MurmurHash64`

public abstract class HashFunction extends Object
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`

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HashFunction()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract long`
  `hash(BytesRef bytes)`
  Hashes the contents of the referenced bytes

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### HashFunction

    public HashFunction()

- ## Method Details

  - ### hash

    public abstract long hash(BytesRef bytes)
    Hashes the contents of the referenced bytes
    Parameters:
      `bytes` - the data to be hashed
    Returns:
      the hash of the bytes referenced by bytes.offset and length bytes.length