Modifier and Type | Method and Description |
---|---|
static HashCode |
fromBytes(byte[] bytes)
Creates a
HashCode from a byte array. |
static HashCode |
fromInt(int hash)
Creates a 32-bit
HashCode , of which the bytes will form the passed int, interpreted
in little endian order. |
static HashCode |
fromLong(long hash)
Creates a 64-bit
HashCode , of which the bytes will form the passed long, interpreted
in little endian order. |
public static HashCode fromInt(int hash)
HashCode
, of which the bytes will form the passed int, interpreted
in little endian order.public static HashCode fromLong(long hash)
HashCode
, of which the bytes will form the passed long, interpreted
in little endian order.public static HashCode fromBytes(byte[] bytes)
HashCode
from a byte array. The array is defensively copied to preserve
the immutability contract of HashCode
. The array cannot be empty.