Class XXHash64


  • public abstract class XXHash64
    extends java.lang.Object
    A 64-bits hash.

    Instances of this class are thread-safe.

    • Constructor Summary

      Constructors 
      Constructor Description
      XXHash64()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract long hash​(byte[] buf, int off, int len, long seed)
      Computes the 64-bits hash of buf[off:off+len] using seed seed.
      abstract long hash​(java.nio.ByteBuffer buf, int off, int len, long seed)
      Computes the hash of the given slice of the ByteBuffer.
      long hash​(java.nio.ByteBuffer buf, long seed)
      Computes the hash of the given ByteBuffer.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XXHash64

        public XXHash64()
    • Method Detail

      • hash

        public abstract long hash​(byte[] buf,
                                  int off,
                                  int len,
                                  long seed)
        Computes the 64-bits hash of buf[off:off+len] using seed seed.
        Parameters:
        buf - the input data
        off - the start offset in buf
        len - the number of bytes to hash
        seed - the seed to use
        Returns:
        the hash value
      • hash

        public abstract long hash​(java.nio.ByteBuffer buf,
                                  int off,
                                  int len,
                                  long seed)
        Computes the hash of the given slice of the ByteBuffer. position and limit are not modified.
        Parameters:
        buf - the input data
        off - the start offset in buf
        len - the number of bytes to hash
        seed - the seed to use
        Returns:
        the hash value
      • hash

        public final long hash​(java.nio.ByteBuffer buf,
                               long seed)
        Computes the hash of the given ByteBuffer. The position is moved in order to reflect bytes which have been read.
        Parameters:
        buf - the input data
        seed - the seed to use
        Returns:
        the hash value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object