Class AbstractID

    • Field Detail

      • upperPart

        protected final long upperPart
        The upper part of the actual ID.
      • lowerPart

        protected final long lowerPart
        The lower part of the actual ID.
    • Constructor Detail

      • AbstractID

        public AbstractID​(byte[] bytes)
        Constructs a new ID with a specific bytes value.
      • AbstractID

        public AbstractID​(long lowerPart,
                          long upperPart)
        Constructs a new abstract ID.
        Parameters:
        lowerPart - the lower bytes of the ID
        upperPart - the higher bytes of the ID
      • AbstractID

        public AbstractID​(AbstractID id)
        Copy constructor: Creates a new abstract ID from the given one.
        Parameters:
        id - the abstract ID to copy
      • AbstractID

        public AbstractID()
        Constructs a new random ID from a uniform distribution.
    • Method Detail

      • getLowerPart

        public long getLowerPart()
        Gets the lower 64 bits of the ID.
        Returns:
        The lower 64 bits of the ID.
      • getUpperPart

        public long getUpperPart()
        Gets the upper 64 bits of the ID.
        Returns:
        The upper 64 bits of the ID.
      • getBytes

        public byte[] getBytes()
        Gets the bytes underlying this ID.
        Returns:
        The bytes underlying this ID.
      • toHexString

        public final String toHexString()
        Returns pure String representation of the ID in hexadecimal. This method should be used to construct things like paths etc., that require a stable representation and is therefore final.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object