Example usage for Java com.google.common.hash HashCode fields, constructors, methods, implement or subclass
The text is from its open source code.
HashCode() | |
hashCode() Returns a hash code value for the object. |
byte[] | asBytes() Returns the value of this hash code as a byte array. |
int | asInt() Returns the first four bytes of #asBytes() this hashcode's bytes , converted to an int value in little-endian order. |
long | asLong() Returns the first eight bytes of #asBytes() 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. |
boolean | equals(@Nullable Object object) Returns true if object is a HashCode instance with the identical byte representation to this hash code. |
HashCode | fromBytes(byte[] bytes) Creates a HashCode from a byte array. |
HashCode | fromInt(int hash) Creates a 32-bit HashCode representation of the given int value. |
HashCode | fromLong(long hash) Creates a 64-bit HashCode representation of the given long value. |
HashCode | fromString(String string) Creates a HashCode from a hexadecimal ( base 16 ) encoded string. |
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. |
String | toString() Returns a string containing each byte of #asBytes , in order, as a two-digit unsigned hexadecimal number in lower case. |