Class Murmur3

java.lang.Object
io.fluxcapacitor.common.Murmur3

public class Murmur3
extends Object
The MurmurHash3 algorithm was created by Austin Appleby and placed in the public domain. This java port was authored by Yonik Seeley and also placed into the public domain.

This produces exactly the same hash values as the final C++ version of MurmurHash3 and is thus suitable for producing the same hash values across platforms.

See http://github.com/yonik/java_util for future updates to this file.

  • Constructor Summary

    Constructors
    Constructor Description
    Murmur3()  
  • Method Summary

    Modifier and Type Method Description
    static int murmurhash3_x86_32​(CharSequence data)
    Returns the MurmurHash3_x86_32 hash of the UTF-8 bytes of the String using seed of 0 without actually encoding the string to a temporary buffer.
    static int murmurhash3_x86_32​(CharSequence data, int offset, int len, int seed)
    Returns the MurmurHash3_x86_32 hash of the UTF-8 bytes of the String without actually encoding the string to a temporary buffer.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Murmur3

      public Murmur3()
  • Method Details

    • murmurhash3_x86_32

      public static int murmurhash3_x86_32​(CharSequence data)
      Returns the MurmurHash3_x86_32 hash of the UTF-8 bytes of the String using seed of 0 without actually encoding the string to a temporary buffer.
      Parameters:
      data - string to hash
      Returns:
      the hash code
    • murmurhash3_x86_32

      public static int murmurhash3_x86_32​(CharSequence data, int offset, int len, int seed)
      Returns the MurmurHash3_x86_32 hash of the UTF-8 bytes of the String without actually encoding the string to a temporary buffer.
      Parameters:
      data - string to hash
      offset - start in substring to hash
      len - length of substring to hash
      seed - algorithm seed
      Returns:
      the hash code