Class ObjectDataType.AutoDetectDataType<T>

    • Field Detail

      • typeId

        final int typeId
        The type id.
    • Constructor Detail

      • AutoDetectDataType

        AutoDetectDataType​(int typeId)
      • AutoDetectDataType

        AutoDetectDataType​(ObjectDataType base,
                           int typeId)
    • Method Detail

      • getMemory

        public int getMemory​(T o)
        Description copied from interface: DataType
        Calculates the amount of used memory in bytes.
        Specified by:
        getMemory in interface DataType<T>
        Specified by:
        getMemory in class BasicDataType<T>
        Parameters:
        o - the object
        Returns:
        the used memory
      • getType

        DataType<java.lang.Object> getType​(java.lang.Object o)
        Get the type for the given object.
        Parameters:
        o - the object
        Returns:
        the type
      • read

        abstract java.lang.Object read​(java.nio.ByteBuffer buff,
                                       int tag)
        Read an object from the buffer.
        Parameters:
        buff - the buffer
        tag - the first byte of the object (usually the type)
        Returns:
        the read object