| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final char[] |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public abstract byte[] | |
| public abstract int | asInt()
Returns the first four bytes of this hashcode's bytes, converted to an
|
| public abstract long | asLong()
Returns the first eight bytes of this hashcode's bytes, converted to a
|
| public abstract int | |
| private static int | |
| public final boolean | equals(Object
the reference object with which to compare. object)Overrides java. true if object is a HashCode instance with the identical byte
representation to this hash code.
|
| pack-priv abstract boolean | equalsSameBits(HashCode that)
Returns whether this |
| public static HashCode | |
| pack-priv static HashCode | |
| public static HashCode | |
| public static HashCode | |
| public static HashCode | |
| pack-priv byte[] | getBytesInternal()
Returns a mutable view of the underlying bytes for the given |
| public final int | hashCode()
Overrides java. HashCode instance; this is well-defined (so, for
example, you can safely put HashCode instances into a HashSet) but is otherwise
probably not what you want to use.
|
| public abstract long | padToLong()
If this hashcode has enough bits, returns |
| public final String | toString()
Overrides java. asBytes, in order, as a two-digit unsigned
hexadecimal number in lower case.
|
| public int | Returns: the number of bytes written todestthe byte array into which the hash code will be written dest, int the start offset in the data offset, int the maximum number of bytes to write maxLength)Copies bytes from this hash code into |
| pack-priv abstract void |
| hexDigits | back to summary |
|---|---|
| private static final char[] hexDigits | |
| HashCode | back to summary |
|---|---|
| pack-priv HashCode() | |
| asBytes | back to summary |
|---|---|
| public abstract byte[] asBytes() Returns the value of this hash code as a byte array. The caller may modify the byte array;
changes to it will not be reflected in this | |
| asInt | back to summary |
|---|---|
| public abstract int asInt() Returns the first four bytes of this hashcode's bytes, converted to an
| |
| asLong | back to summary |
|---|---|
| public abstract long asLong() Returns the first eight bytes of this hashcode's bytes, converted to a
| |
| bits | back to summary |
|---|---|
| public abstract int bits() Returns the number of bits in this hash code; a positive multiple of 8. | |
| decode | back to summary |
|---|---|
| private static int decode(char ch) | |
| equals | back to summary |
|---|---|
| public final boolean equals(Object object) Overrides java. Returns Security Note this method uses a constant-time (not short-circuiting) implementation to protect against timing attacks.
| |
| equalsSameBits | back to summary |
|---|---|
| pack-priv abstract boolean equalsSameBits(HashCode that) Returns whether this | |
| fromBytes | back to summary |
|---|---|
| public static HashCode fromBytes(byte[] bytes) Creates a
| |
| fromBytesNoCopy | back to summary |
|---|---|
| pack-priv static HashCode fromBytesNoCopy(byte[] bytes) Creates a | |
| fromInt | back to summary |
|---|---|
| public static HashCode fromInt(int hash) Creates a 32-bit
| |
| fromLong | back to summary |
|---|---|
| public static HashCode fromLong(long hash) Creates a 64-bit
| |
| fromString | back to summary |
|---|---|
| public static HashCode fromString(String string) Creates a This method accepts the exact format generated by
| |
| getBytesInternal | back to summary |
|---|---|
| pack-priv byte[] getBytesInternal() Returns a mutable view of the underlying bytes for the given | |
| hashCode | back to summary |
|---|---|
| public final int hashCode() Overrides java. Returns a "Java hash code" for this
| |
| padToLong | back to summary |
|---|---|
| public abstract long padToLong() If this hashcode has enough bits, returns
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides java. Returns a string containing each byte of Note that if the output is considered to be a single hexadecimal number, whether this string
is big-endian or little-endian depends on the byte order of To create a
| |
| writeBytesTo | back to summary |
|---|---|
| public int writeBytesTo(byte[] dest, int offset, int maxLength) Copies bytes from this hash code into
| |
| writeBytesToImpl | back to summary |
|---|---|
| pack-priv abstract void writeBytesToImpl(byte[] dest, int offset, int maxLength) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final byte[] | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | asBytes()
Implements abstract com. |
| public int | asInt()
Implements abstract com. int value in little-endian order.
|
| public long | asLong()
Implements abstract com. long value in little-endian order.
|
| public int | bits()
Implements abstract com. |
| pack-priv boolean | equalsSameBits(HashCode that)
Implements abstract com. HashCode and that HashCode have the same value, given that
they have the same number of bits.
|
| pack-priv byte[] | getBytesInternal()
Overrides com. HashCode if it is a
byte-based hashcode.
|
| public long | padToLong()
Implements abstract com. asLong(), otherwise returns a long
value with asBytes() as the least-significant bytes and 0x00 as the remaining
most-significant bytes.
|
| pack-priv void | writeBytesToImpl(byte[] dest, int offset, int maxLength)
Implements abstract com. |
| bytes | back to summary |
|---|---|
| pack-priv final byte[] bytes | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| BytesHashCode | back to summary |
|---|---|
| pack-priv BytesHashCode(byte[] bytes) | |
| asBytes | back to summary |
|---|---|
| public byte[] asBytes() Implements abstract com. Doc from com. Returns the value of this hash code as a byte array. The caller may modify the byte array;
changes to it will not be reflected in this
| |
| asInt | back to summary |
|---|---|
| public int asInt() Implements abstract com. Doc from com. Returns the first four bytes of this hashcode's bytes, converted to an
| |
| asLong | back to summary |
|---|---|
| public long asLong() Implements abstract com. Doc from com. Returns the first eight bytes of this hashcode's bytes, converted to a
| |
| bits | back to summary |
|---|---|
| public int bits() Implements abstract com. Doc from com. Returns the number of bits in this hash code; a positive multiple of 8.
| |
| equalsSameBits | back to summary |
|---|---|
| pack-priv boolean equalsSameBits(HashCode that) Implements abstract com. Doc from com. Returns whether this
| |
| getBytesInternal | back to summary |
|---|---|
| pack-priv byte[] getBytesInternal() Overrides com. Doc from com. Returns a mutable view of the underlying bytes for the given
| |
| padToLong | back to summary |
|---|---|
| public long padToLong() Implements abstract com. Doc from com. If this hashcode has enough bits, returns
| |
| writeBytesToImpl | back to summary |
|---|---|
| pack-priv void writeBytesToImpl(byte[] dest, int offset, int maxLength) Implements abstract com.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | asBytes()
Implements abstract com. |
| public int | asInt()
Implements abstract com. int value in little-endian order.
|
| public long | asLong()
Implements abstract com. long value in little-endian order.
|
| public int | bits()
Implements abstract com. |
| pack-priv boolean | equalsSameBits(HashCode that)
Implements abstract com. HashCode and that HashCode have the same value, given that
they have the same number of bits.
|
| public long | padToLong()
Implements abstract com. asLong(), otherwise returns a long
value with asBytes() as the least-significant bytes and 0x00 as the remaining
most-significant bytes.
|
| pack-priv void | writeBytesToImpl(byte[] dest, int offset, int maxLength)
Implements abstract com. |
| hash | back to summary |
|---|---|
| pack-priv final int hash | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| IntHashCode | back to summary |
|---|---|
| pack-priv IntHashCode(int hash) | |
| asBytes | back to summary |
|---|---|
| public byte[] asBytes() Implements abstract com. Doc from com. Returns the value of this hash code as a byte array. The caller may modify the byte array;
changes to it will not be reflected in this
| |
| asInt | back to summary |
|---|---|
| public int asInt() Implements abstract com. Doc from com. Returns the first four bytes of this hashcode's bytes, converted to an
| |
| asLong | back to summary |
|---|---|
| public long asLong() Implements abstract com. Doc from com. Returns the first eight bytes of this hashcode's bytes, converted to a
| |
| bits | back to summary |
|---|---|
| public int bits() Implements abstract com. Doc from com. Returns the number of bits in this hash code; a positive multiple of 8.
| |
| equalsSameBits | back to summary |
|---|---|
| pack-priv boolean equalsSameBits(HashCode that) Implements abstract com. Doc from com. Returns whether this
| |
| padToLong | back to summary |
|---|---|
| public long padToLong() Implements abstract com. Doc from com. If this hashcode has enough bits, returns
| |
| writeBytesToImpl | back to summary |
|---|---|
| pack-priv void writeBytesToImpl(byte[] dest, int offset, int maxLength) Implements abstract com.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final long | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | asBytes()
Implements abstract com. |
| public int | asInt()
Implements abstract com. int value in little-endian order.
|
| public long | asLong()
Implements abstract com. long value in little-endian order.
|
| public int | bits()
Implements abstract com. |
| pack-priv boolean | equalsSameBits(HashCode that)
Implements abstract com. HashCode and that HashCode have the same value, given that
they have the same number of bits.
|
| public long | padToLong()
Implements abstract com. asLong(), otherwise returns a long
value with asBytes() as the least-significant bytes and 0x00 as the remaining
most-significant bytes.
|
| pack-priv void | writeBytesToImpl(byte[] dest, int offset, int maxLength)
Implements abstract com. |
| hash | back to summary |
|---|---|
| pack-priv final long hash | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| LongHashCode | back to summary |
|---|---|
| pack-priv LongHashCode(long hash) | |
| asBytes | back to summary |
|---|---|
| public byte[] asBytes() Implements abstract com. Doc from com. Returns the value of this hash code as a byte array. The caller may modify the byte array;
changes to it will not be reflected in this
| |
| asInt | back to summary |
|---|---|
| public int asInt() Implements abstract com. Doc from com. Returns the first four bytes of this hashcode's bytes, converted to an
| |
| asLong | back to summary |
|---|---|
| public long asLong() Implements abstract com. Doc from com. Returns the first eight bytes of this hashcode's bytes, converted to a
| |
| bits | back to summary |
|---|---|
| public int bits() Implements abstract com. Doc from com. Returns the number of bits in this hash code; a positive multiple of 8.
| |
| equalsSameBits | back to summary |
|---|---|
| pack-priv boolean equalsSameBits(HashCode that) Implements abstract com. Doc from com. Returns whether this
| |
| padToLong | back to summary |
|---|---|
| public long padToLong() Implements abstract com. Doc from com. If this hashcode has enough bits, returns
| |
| writeBytesToImpl | back to summary |
|---|---|
| pack-priv void writeBytesToImpl(byte[] dest, int offset, int maxLength) Implements abstract com.
| |