Package org.atlanmod.commons.hash
Interface HashCode
-
- All Superinterfaces:
Serializable
@Immutable @ParametersAreNonnullByDefault public interface HashCode extends Serializable
An immutable hash code of arbitrary bit length.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intbits()Returns the number of bits in this hash code; a positive multiple of 8.byte[]toBytes()Returns the value of this hash code as a byte array.StringtoHexString()Returns the literal representation of this hash code.longtoLong()Returns the long representation of this hash code.
-
-
-
Method Detail
-
bits
@Nonnegative int bits()
Returns the number of bits in this hash code; a positive multiple of 8.- Returns:
- the number of bits
-
toBytes
@Nonnull byte[] toBytes()
Returns the value of this hash code as a byte array.- Returns:
- a byte array
-
toLong
long toLong()
Returns the long representation of this hash code.- Returns:
- a long
-
toHexString
@Nonnull String toHexString()
Returns the literal representation of this hash code.- Returns:
- a string
-
-