|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.common.hash.HashCodes
@Beta public final class HashCodes
Static factories for creating HashCode
instances; most users should never have to use
this. All returned instances are Serializable
.
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
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 must be at least of length 4.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |