Class ObjectDataType.NullType

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NullType()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(java.lang.Object aObj, java.lang.Object bObj)
      Compare two keys.
      java.lang.Object[] createStorage​(int size)
      Create storage object of array type to hold values
      int getMemory​(java.lang.Object obj)
      Calculates the amount of used memory in bytes.
      java.lang.Object read​(java.nio.ByteBuffer buff)
      Read an object.
      java.lang.Object read​(java.nio.ByteBuffer buff, int tag)
      Read an object from the buffer.
      void write​(WriteBuffer buff, java.lang.Object obj)
      Write an object.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • NullType

        private NullType()
    • Method Detail

      • createStorage

        public java.lang.Object[] createStorage​(int size)
        Description copied from interface: DataType
        Create storage object of array type to hold values
        Parameters:
        size - number of values to hold
        Returns:
        storage object
      • compare

        public int compare​(java.lang.Object aObj,
                           java.lang.Object bObj)
        Description copied from interface: DataType
        Compare two keys.
        Specified by:
        compare in interface java.util.Comparator<java.lang.Object>
        Specified by:
        compare in interface DataType<java.lang.Object>
        Overrides:
        compare in class BasicDataType<java.lang.Object>
        Parameters:
        aObj - the first key
        bObj - the second key
        Returns:
        -1 if the first key is smaller, 1 if larger, and 0 if equal
      • getMemory

        public int getMemory​(java.lang.Object obj)
        Description copied from interface: DataType
        Calculates the amount of used memory in bytes.
        Specified by:
        getMemory in interface DataType<java.lang.Object>
        Overrides:
        getMemory in class ObjectDataType.AutoDetectDataType<java.lang.Object>
        Parameters:
        obj - the object
        Returns:
        the used memory
      • read

        public java.lang.Object read​(java.nio.ByteBuffer buff)
        Description copied from interface: DataType
        Read an object.
        Specified by:
        read in interface DataType<java.lang.Object>
        Specified by:
        read in class BasicDataType<java.lang.Object>
        Parameters:
        buff - the source buffer
        Returns:
        the object
      • read

        public java.lang.Object read​(java.nio.ByteBuffer buff,
                                     int tag)
        Description copied from class: ObjectDataType.AutoDetectDataType
        Read an object from the buffer.
        Specified by:
        read in class ObjectDataType.AutoDetectDataType<java.lang.Object>
        Parameters:
        buff - the buffer
        tag - the first byte of the object (usually the type)
        Returns:
        the read object