org.apache.lucene.codecs.bloom

Class HashFunction

  • Direct Known Subclasses:
    MurmurHash2


    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
    • Method Detail

      • hash

        public abstract int 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