Class UuidBase<T extends UuidBase<T>>

    • Constructor Detail

      • UuidBase

        public UuidBase()
        Constructs new random identifier.
      • UuidBase

        public UuidBase​(long hiBits,
                        long loBits)
        Constructs new instance from the specified higher/lower bits.
        Parameters:
        hiBits - Higher bits (see hiBits()).
        loBits - Lower bits (see loBits()).
      • UuidBase

        public UuidBase​(String s)
        Creates new identifier from the specified string.

        Only strings that were produced by the toString() method can be parsed.

        Parameters:
        s - String (see toString()).
    • Method Detail

      • hiBits

        public long hiBits()
        Returns higher bits of this identifier.

        This property can be used for custom serialization of this identifier. Value of this property can be used with UuidBase(long, long) to reconstruct this identifier.

        Returns:
        Higher bits of this identifier.
      • loBits

        public long loBits()
        Returns lower bits of this identifier.

        This property can be used for custom serialization of this identifier. Value of this property can be used with UuidBase(long, long) to reconstruct this identifier.

        Returns:
        Lower bits of this identifier.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object