Class DenseObjectSegmentDataset

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<CellKey,​java.lang.Object>>, SegmentDataset

    class DenseObjectSegmentDataset
    extends DenseSegmentDataset
    Implementation of DenseSegmentDataset that stores values of type Object.

    The storage requirements are as follows. Table requires 1 word per cell.

    Since:
    21 March, 2002
    Author:
    jhyde
    • Field Detail

      • values

        final java.lang.Object[] values
    • Constructor Detail

      • DenseObjectSegmentDataset

        DenseObjectSegmentDataset​(SegmentAxis[] axes,
                                  int size)
        Creates a DenseSegmentDataset.
        Parameters:
        axes - Segment axes, containing actual column values
        size - Number of coordinates
      • DenseObjectSegmentDataset

        DenseObjectSegmentDataset​(SegmentAxis[] axes,
                                  java.lang.Object[] values)
        Creates and populates a DenseSegmentDataset. The data set is not copied.
        Parameters:
        axes - Axes
        values - Data set
    • Method Detail

      • isNull

        public boolean isNull​(CellKey pos)
        Description copied from interface: SegmentDataset
        Returns whether the cell at a given coordinate is null.
        Parameters:
        pos - Coordinate position
        Returns:
        Whether cell value is null
      • exists

        public boolean exists​(CellKey pos)
        Description copied from interface: SegmentDataset
        Returns whether there is a value at a given coordinate.
        Parameters:
        pos - Coordinate position
        Returns:
        Whether there is a value
      • populateFrom

        public void populateFrom​(int[] pos,
                                 SegmentLoader.RowList rowList,
                                 int column)
        Description copied from interface: SegmentDataset
        Sets the value a given ordinal.
        Parameters:
        pos - Ordinal
        rowList - Row list
        column - Column of row list
      • getType

        public SqlStatement.Type getType()
        Description copied from interface: SegmentDataset
        Returns the SQL type of the data contained in this dataset.
        Returns:
        A value of SqlStatement.Type
      • put

        public void put​(CellKey key,
                        java.lang.Object value)
      • createSegmentBody

        public SegmentBody createSegmentBody​(java.util.List<Pair<java.util.SortedSet<java.lang.Comparable>,​java.lang.Boolean>> axes)
        Description copied from interface: SegmentDataset
        Return an immutable, final and serializable implementation of a SegmentBody in order to cache this dataset.
        Parameters:
        axes - An array with, for each axis, the set of axis values, sorted in natural order, and a flag saying whether the null value is also present. This is supplied by the SegmentLoader.
        Returns:
        A SegmentBody.