Class ValueDataType

    • Constructor Detail

      • ValueDataType

        public ValueDataType()
      • ValueDataType

        public ValueDataType​(Database database,
                             int[] sortTypes)
    • Method Detail

      • getRowFactory

        public RowFactory getRowFactory()
      • setRowFactory

        public void setRowFactory​(RowFactory rowFactory)
      • createStorage

        public Value[] createStorage​(int size)
        Description copied from interface: DataType
        Create storage object of array type to hold values
        Specified by:
        createStorage in interface DataType<Value>
        Parameters:
        size - number of values to hold
        Returns:
        storage object
      • compare

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

        public int compareValues​(Value a,
                                 Value b,
                                 int sortType)
        Compares the specified values.
        Parameters:
        a - the first value
        b - the second value
        sortType - the sorting type
        Returns:
        0 if equal, -1 if first value is smaller for ascending or larger for descending sort type, 1 otherwise
      • read

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

        public static void writeLong​(WriteBuffer buff,
                                     long x)
        Writes a long.
        Parameters:
        buff - the target buffer
        x - the long value
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface java.util.Comparator<Value>
        Overrides:
        equals in class BasicDataType<Value>