Package io.fluxcapacitor.common
Class Murmur3
java.lang.Object
io.fluxcapacitor.common.Murmur3
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 ... for future updates to this file.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
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.
-
Constructor Details
-
Murmur3
public Murmur3()
-
-
Method Details
-
murmurhash3_x86_32
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
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 hashoffset
- start in substring to hashlen
- length of substring to hashseed
- algorithm seed- Returns:
- the hash code
-