Hasher, which only requires subtypes to implement putByte. Subtypes may provide more efficient implementations, however.
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final Hasher | |
| public Hasher | putBytes(byte[]
a byte array bytes)Implements com. |
| public Hasher | putBytes(byte[]
a byte array bytes, int the start offset in the array off, int the number of bytes to write len)Implements com. |
| public Hasher | putBytes(ByteBuffer
a byte buffer b)Implements com. |
| public Hasher | |
| public final Hasher | putDouble(double d)
Implements com. putLong(Double.doubleToRawLongBits(d)).
|
| public final Hasher | putFloat(float f)
Implements com. putInt(Float.floatToRawIntBits(f)).
|
| public Hasher | |
| public Hasher | |
| public <T extends @Nullable Object> Hasher | putObject(T instance, Funnel<? super T> funnel)
Implements com. funnel.funnel(object, this).
|
| public Hasher | |
| public Hasher | putString(CharSequence charSequence, Charset charset)
Implements com. putBytes(charSequence.toString().getBytes(charset)).
|
| public Hasher | putUnencodedChars(CharSequence charSequence)
Implements com. char value in the CharSequence, in order.
|
| AbstractHasher | back to summary |
|---|---|
| pack-priv AbstractHasher() | |
| putBoolean | back to summary |
|---|---|
| public final Hasher putBoolean(boolean b) Implements com. Doc from com. Equivalent to
| |
| putBytes | back to summary |
|---|---|
| public Hasher putBytes(byte[] bytes) Implements com. Doc from com. Puts an array of bytes into this sink.
| |
| putBytes | back to summary |
|---|---|
| public Hasher putBytes(byte[] bytes, int off, int len) Implements com. Doc from com. Puts a chunk of an array of bytes into this sink.
| |
| putBytes | back to summary |
|---|---|
| public Hasher putBytes(ByteBuffer b) 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) Implements com. Doc from com. Puts a character into this sink.
| |
| putDouble | back to summary |
|---|---|
| public final Hasher putDouble(double d) Implements com. Doc from com. Equivalent to
| |
| putFloat | back to summary |
|---|---|
| public final Hasher putFloat(float f) Implements com. Doc from com. Equivalent to
| |
| putInt | back to summary |
|---|---|
| public Hasher putInt(int i) Implements com. Doc from com. Puts an int into this sink.
| |
| putLong | back to summary |
|---|---|
| public Hasher putLong(long l) Implements com. Doc from com. Puts a long into this sink.
| |
| putObject | back to summary |
|---|---|
| public <T extends @Nullable Object> Hasher putObject(T instance, Funnel<? super T> funnel) Implements com. Doc from com. A simple convenience for
| |
| putShort | back to summary |
|---|---|
| public Hasher putShort(short s) Implements com. Doc from com. Puts a short into this sink.
| |
| putString | back to summary |
|---|---|
| public Hasher putString(CharSequence charSequence, Charset charset) 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
| |
| putUnencodedChars | back to summary |
|---|---|
| public Hasher putUnencodedChars(CharSequence charSequence) Implements com. Doc from com. Equivalent to processing each 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
| |