Modifier and Type | Field and Description |
---|---|
(package private) int |
hash |
private static long |
serialVersionUID |
Constructor and Description |
---|
IntHashCode(int hash) |
Modifier and Type | Method and Description |
---|---|
byte[] |
asBytes()
Returns the value of this hash code as a byte array.
|
int |
asInt()
Returns the first four bytes of this hashcode's bytes, converted to an
int value in little-endian order. |
long |
asLong()
Returns the first eight bytes of this hashcode's bytes, converted to a
long value in little-endian order. |
int |
bits()
Returns the number of bits in this hash code; a positive multiple of 8.
|
(package private) boolean |
equalsSameBits(HashCode that)
Returns whether this
HashCode and that HashCode have the same value, given that
they have the same number of bits. |
long |
padToLong()
If this hashcode has enough bits, returns
asLong() , otherwise returns a long
value with asBytes() as the least-significant bytes and 0x00 as the remaining
most-significant bytes. |
(package private) void |
writeBytesToImpl(byte[] dest,
int offset,
int maxLength) |
equals, fromBytes, fromBytesNoCopy, fromInt, fromLong, fromString, getBytesInternal, hashCode, toString, writeBytesTo
final int hash
private static final long serialVersionUID
public int bits()
HashCode
public byte[] asBytes()
HashCode
HashCode
object or any other arrays
returned by this method.public int asInt()
HashCode
int
value in little-endian order.public long asLong()
HashCode
long
value in little-endian order.public long padToLong()
HashCode
asLong()
, otherwise returns a long
value with asBytes()
as the least-significant bytes and 0x00
as the remaining
most-significant bytes.void writeBytesToImpl(byte[] dest, int offset, int maxLength)
writeBytesToImpl
in class HashCode
boolean equalsSameBits(HashCode that)
HashCode
HashCode
and that HashCode
have the same value, given that
they have the same number of bits.equalsSameBits
in class HashCode