Class SingleRow<I extends QueryItem>

  • Type Parameters:
    I - QueryItem on which the Report is based on.
    All Implemented Interfaces:
    Row<I>
    Direct Known Subclasses:
    FoldableRow

    public class SingleRow<I extends QueryItem>
    extends Object
    implements Row<I>
    A SingleRow represents a single row in a Report. It contains an array of cells whose index corresponds to the ColumnHeader index in the Report.
    • Constructor Detail

      • SingleRow

        public SingleRow​(String key,
                         int columnCount)
    • Method Detail

      • addItem

        public void addItem​(I item,
                            int index)
                     throws IndexOutOfBoundsException
        Description copied from interface: Row
        Appends a specific item value at a specific index.
        Specified by:
        addItem in interface Row<I extends QueryItem>
        Parameters:
        item - the item which will be appended
        index - the index at which the item will be appended at.
        Throws:
        IndexOutOfBoundsException - if the given index is invalid.
      • updateTotalValue

        public void updateTotalValue​(I item)
        Description copied from interface: Row
        updates the total value of the row without changing any cell value.
        Specified by:
        updateTotalValue in interface Row<I extends QueryItem>
        Parameters:
        item - the item whose value will be added to the total value of this row.
      • getCells

        public final int[] getCells()
        Specified by:
        getCells in interface Row<I extends QueryItem>