Class HashCodes


  • @Beta
    @Deprecated
    public final class HashCodes
    extends java.lang.Object
    Deprecated.
    Use the duplicated methods in HashCode instead. This class is scheduled to be removed in Guava 16.0.
    Static factories for creating HashCode instances; most users should never have to use this. All returned instances are Serializable.
    Since:
    12.0
    • Method Detail

      • fromInt

        @Deprecated
        public static HashCode fromInt​(int hash)
        Deprecated.
        Use HashCode.fromInt(int) instead. This method is scheduled to be removed in Guava 16.0.
        Creates a 32-bit HashCode, of which the bytes will form the passed int, interpreted in little endian order.
      • fromLong

        @Deprecated
        public static HashCode fromLong​(long hash)
        Deprecated.
        Use HashCode.fromLong(long) instead. This method is scheduled to be removed in Guava 16.0.
        Creates a 64-bit HashCode, of which the bytes will form the passed long, interpreted in little endian order.
      • fromBytes

        @Deprecated
        public static HashCode fromBytes​(byte[] bytes)
        Deprecated.
        Use HashCode.fromBytes(byte[]) instead. This method is scheduled to be removed in Guava 16.0.
        Creates a HashCode from a byte array. The array is defensively copied to preserve the immutability contract of HashCode. The array cannot be empty.