| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| pack-priv static final HashFunction | |
| pack-priv static final HashFunction | |
| pack-priv static final HashFunction | |
| private final int | |
| private static final long | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | bits()
Implements com. |
| private static long | |
| private static long | |
| private static long | |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. |
| private static HashCode | |
| private static int | |
| public HashCode | hashBytes(byte[] input, int off, int len)
Overrides com. Implements com. newHasher().putBytes(input, off, len).hash().
|
| public int | |
| public HashCode | hashInt(int input)
Overrides com. Implements com. newHasher().putInt(input).hash(); returns the hash code for the given
int value, interpreted in little-endian byte order.
|
| public HashCode | hashLong(long input)
Overrides com. Implements com. newHasher().putLong(input).hash(); returns the hash code for the given
long value, interpreted in little-endian byte order.
|
| public HashCode | hashString(CharSequence input, Charset charset)
Overrides com. Implements com. newHasher().putString(input, charset).hash().
|
| public HashCode | hashUnencodedChars(CharSequence input)
Overrides com. Implements com. newHasher().putUnencodedChars(input).hash().
|
| private static int | |
| private static int | |
| public Hasher | newHasher()
Implements com. Hasher
instance that is ready to receive data.
|
| public String |
| C1 | back to summary |
|---|---|
| private static final int C1 | |
| C2 | back to summary |
|---|---|
| private static final int C2 | |
| CHUNK_SIZE | back to summary |
|---|---|
| private static final int CHUNK_SIZE | |
| GOOD_FAST_HASH_32 | back to summary |
|---|---|
| pack-priv static final HashFunction GOOD_FAST_HASH_32 | |
| MURMUR3_32 | back to summary |
|---|---|
| pack-priv static final HashFunction MURMUR3_32 | |
| MURMUR3_32_FIXED | back to summary |
|---|---|
| pack-priv static final HashFunction MURMUR3_32_FIXED | |
| seed | back to summary |
|---|---|
| private final int seed | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| supplementaryPlaneFix | back to summary |
|---|---|
| private final boolean supplementaryPlaneFix | |
| Murmur3_32HashFunction | back to summary |
|---|---|
| pack-priv Murmur3_32HashFunction(int seed, boolean supplementaryPlaneFix) | |
| bits | back to summary |
|---|---|
| public int bits() Implements com. Doc from com. Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
| |
| charToThreeUtf8Bytes | back to summary |
|---|---|
| private static long charToThreeUtf8Bytes(char c) | |
| charToTwoUtf8Bytes | back to summary |
|---|---|
| private static long charToTwoUtf8Bytes(char c) | |
| codePointToFourUtf8Bytes | back to summary |
|---|---|
| private static long codePointToFourUtf8Bytes(int codePoint) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| fmix | back to summary |
|---|---|
| private static HashCode fmix(int h1, int length) | |
| getIntLittleEndian | back to summary |
|---|---|
| private static int getIntLittleEndian(byte[] input, int offset) | |
| hashBytes | back to summary |
|---|---|
| public HashCode hashBytes(byte[] input, int off, int len) Overrides com. Implements com. Doc from com. Shortcut for
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hashInt | back to summary |
|---|---|
| public HashCode hashInt(int input) Overrides com. Implements com. Doc from com. Shortcut for
| |
| hashLong | back to summary |
|---|---|
| public HashCode hashLong(long input) Overrides com. Implements com. Doc from com. Shortcut for
| |
| hashString | back to summary |
|---|---|
| public HashCode hashString(CharSequence input, Charset charset) Overrides com. Implements com. Doc from com. Shortcut for Warning This method, which reencodes the input before hashing it, is useful only for
cross-language compatibility. For other use cases, prefer
| |
| hashUnencodedChars | back to summary |
|---|---|
| public HashCode hashUnencodedChars(CharSequence input) Overrides com. Implements com. Doc from com. Shortcut for Warning This method will produce different output than most other languages do when
running the same hash function on the equivalent input. For cross-language compatibility, use
| |
| mixH1 | back to summary |
|---|---|
| private static int mixH1(int h1, int k1) | |
| mixK1 | back to summary |
|---|---|
| private static int mixK1(int k1) | |
| newHasher | back to summary |
|---|---|
| public Hasher newHasher() Implements com. Doc from com. Begins a new hash code computation by returning an initialized, stateful
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private int | |
| private boolean | |
| private int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public HashCode | hash()
Implements com. |
| public Hasher | |
| public Hasher | putBytes(byte[]
a byte array bytes, int the start offset in the array off, int the number of bytes to write len)Overrides com. Implements com. |
| public Hasher | putBytes(ByteBuffer
a byte buffer buffer)Overrides com. Implements com. |
| public Hasher | putChar(char c)
Overrides com. Implements com. |
| public Hasher | putInt(int i)
Overrides com. Implements com. |
| public Hasher | putLong(long l)
Overrides com. Implements com. |
| public Hasher | putString(CharSequence input, Charset charset)
Overrides com. Implements com. putBytes(charSequence.toString().getBytes(charset)).
|
| private void |
| buffer | back to summary |
|---|---|
| private long buffer | |
| h1 | back to summary |
|---|---|
| private int h1 | |
| isDone | back to summary |
|---|---|
| private boolean isDone | |
| length | back to summary |
|---|---|
| private int length | |
| shift | back to summary |
|---|---|
| private int shift | |
| Murmur3_32Hasher | back to summary |
|---|---|
| pack-priv Murmur3_32Hasher(int seed) | |
| hash | back to summary |
|---|---|
| public HashCode hash() Implements com. Doc from com. Computes a hash code based on the data that have been provided to this hasher. The result is unspecified if this method is called more than once on the same instance.
| |
| putByte | back to summary |
|---|---|
| public Hasher putByte(byte b) Implements com. Doc from com. Puts a byte into this sink.
| |
| putBytes | back to summary |
|---|---|
| public Hasher putBytes(byte[] bytes, int off, int len) Overrides com. Implements com. Doc from com. Puts a chunk of an array of bytes into this sink.
| |
| putBytes | back to summary |
|---|---|
| public Hasher putBytes(ByteBuffer buffer) Overrides com. Implements com. Doc from com. Puts the remaining bytes of a byte buffer into this sink.
| |
| putChar | back to summary |
|---|---|
| public Hasher putChar(char c) Overrides com. Implements com. Doc from com. Puts a character into this sink.
| |
| putInt | back to summary |
|---|---|
| public Hasher putInt(int i) Overrides com. Implements com. Doc from com. Puts an int into this sink.
| |
| putLong | back to summary |
|---|---|
| public Hasher putLong(long l) Overrides com. Implements com. Doc from com. Puts a long into this sink.
| |
| putString | back to summary |
|---|---|
| public Hasher putString(CharSequence input, Charset charset) Overrides com. Implements com. Doc from com. Equivalent to Warning This method, which reencodes the input before hashing it, is useful only for
cross-language compatibility. For other use cases, prefer
| |
| update | back to summary |
|---|---|
| private void update(int nBytes, long update) | |