Class MutableLongObjectId

    • Constructor Detail

      • MutableLongObjectId

        public MutableLongObjectId()
        Empty constructor. Initialize object with default (zeros) value.
    • Method Detail

      • fromObjectId

        public void fromObjectId​(AnyLongObjectId src)
        Copy a LongObjectId into this mutable buffer.
        Parameters:
        src - the source id to copy from.
      • fromRaw

        public void fromRaw​(byte[] bs)
        Convert a LongObjectId from raw binary representation.
        Parameters:
        bs - the raw byte buffer to read from. At least 32 bytes must be available within this byte array.
      • fromRaw

        public void fromRaw​(byte[] bs,
                            int p)
        Convert a LongObjectId from raw binary representation.
        Parameters:
        bs - the raw byte buffer to read from. At least 32 bytes after p must be available within this byte array.
        p - position to read the first byte of data from.
      • fromRaw

        public void fromRaw​(long[] longs)
        Convert a LongObjectId from binary representation expressed in integers.
        Parameters:
        longs - the raw long buffer to read from. At least 4 longs must be available within this longs array.
      • fromRaw

        public void fromRaw​(long[] longs,
                            int p)
        Convert a LongObjectId from binary representation expressed in longs.
        Parameters:
        longs - the raw int buffer to read from. At least 4 longs after p must be available within this longs array.
        p - position to read the first integer of data from.
      • fromString

        public void fromString​(byte[] buf,
                               int offset)
        Convert a LongObjectId from hex characters (US-ASCII).
        Parameters:
        buf - the US-ASCII buffer to read from. At least 32 bytes after offset must be available within this byte array.
        offset - position to read the first character from.
      • fromString

        public void fromString​(String str)
        Convert a LongObjectId from hex characters.
        Parameters:
        str - the string to read from. Must be 64 characters long.
      • toObjectId

        public LongObjectId toObjectId()
        Obtain an immutable copy of this current object.

        See AnyLongObjectId.copy() if this is a possibly subclassed (but immutable) identity and the application needs a lightweight identity only reference.

        Specified by:
        toObjectId in class AnyLongObjectId
        Returns:
        an immutable copy. May be this if this is already an immutable instance.