Class HCRow

    • Constructor Detail

      • HCRow

        @DevelopersNote("Works only for tbody rows!")
        public HCRow()
      • HCRow

        public HCRow​(boolean bHeader)
    • Method Detail

      • isHeader

        public final boolean isHeader()
      • addCell

        @Nonnull
        public final IHCCell<?> addCell()
        Add an empty cell.
        Returns:
        The created cell. Never null.
      • addCellAt

        @Nonnull
        public final IHCCell<?> addCellAt​(@Nonnegative
                                          int nIndex)
        Add an empty cell at the specified index.
        Parameters:
        nIndex - The index where the cell should be added
        Returns:
        The created cell. Never null.
      • addAndReturnCell

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCell​(@Nullable
                                                 String sCellText)
        Add a single cell with the given text element.
        Parameters:
        sCellText - The text to be set into the cell. May be null.
        Returns:
        the created table cell
      • addAndReturnCell

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCell​(@Nullable
                                                 IHCNode aCellChild)
        Add a single new cell and add the passed element.
        Parameters:
        aCellChild - The element to add. May be null.
        Returns:
        The created cell. Never null.
      • addAndReturnCell

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCell​(@Nullable
                                                 String... aCellTexts)
        Add a single cell with the given text elements.
        Parameters:
        aCellTexts - The text to be set into the cell. May be null.
        Returns:
        the created table cell
      • addAndReturnCell

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCell​(@Nullable
                                                 IHCNode... aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        aCellChildren - The list of elements to add. May be null.
        Returns:
        The created cell. Never null.
      • addAndReturnCell

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCell​(@Nullable
                                                 Iterable<? extends IHCNode> aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        aCellChildren - The list of elements to add. May be null.
        Returns:
        The created cell. Never null.
      • addAndReturnCellAt

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCellAt​(@Nonnegative
                                                   int nIndex,
                                                   @Nullable
                                                   String sCellText)
        Add a single cell with the given text element.
        Parameters:
        nIndex - The index where the cell should be added
        sCellText - The text to be set into the cell. May be null.
        Returns:
        the created table cell
      • addAndReturnCellAt

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCellAt​(@Nonnegative
                                                   int nIndex,
                                                   @Nullable
                                                   IHCNode aCellChild)
        Add a single new cell and add the passed element.
        Parameters:
        nIndex - The index where the cell should be added
        aCellChild - The element to add. May be null.
        Returns:
        The created cell. Never null.
      • addAndReturnCellAt

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCellAt​(@Nonnegative
                                                   int nIndex,
                                                   @Nullable
                                                   String... aCellTexts)
        Add a single cell with the given text elements.
        Parameters:
        nIndex - The index where the cell should be added
        aCellTexts - The text to be set into the cell. May be null.
        Returns:
        the created table cell
      • addAndReturnCellAt

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCellAt​(@Nonnegative
                                                   int nIndex,
                                                   @Nullable
                                                   IHCNode... aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        nIndex - The index where the cell should be added
        aCellChildren - The list of elements to add. May be null.
        Returns:
        The created cell. Never null.
      • addAndReturnCellAt

        @Nonnull
        @CheckReturnValue
        public final IHCCell<?> addAndReturnCellAt​(@Nonnegative
                                                   int nIndex,
                                                   @Nullable
                                                   Iterable<? extends IHCNode> aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        nIndex - The index where the cell should be added
        aCellChildren - The list of elements to add. May be null.
        Returns:
        The created cell. Never null.
      • addCell

        @Nonnull
        public final HCRow addCell​(@Nullable
                                   String sCellText)
        Add a single cell with the given text element.
        Parameters:
        sCellText - The text to be set into the cell. May be null.
        Returns:
        this (the table row)
      • addCell

        @Nonnull
        public final HCRow addCell​(@Nullable
                                   IHCNode aChild)
        Add a single new cell and add the passed element.
        Parameters:
        aChild - The element to add. May be null.
        Returns:
        this (the table row)
      • addCell

        @Nonnull
        public final HCRow addCell​(@Nullable
                                   String... aCellTexts)
        Add a single new cell and add the passed texts.
        Parameters:
        aCellTexts - The list of texts to add. May be null.
        Returns:
        this (the table row)
      • addCell

        @Nonnull
        public final HCRow addCell​(@Nullable
                                   IHCNode... aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        aCellChildren - The list of elements to add. May be null.
        Returns:
        this (the table row)
      • addCell

        @Nonnull
        public final HCRow addCell​(@Nullable
                                   Iterable<? extends IHCNode> aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        aCellChildren - The list of elements to add. May be null.
        Returns:
        this (the table row)
      • addCellAt

        @Nonnull
        public final HCRow addCellAt​(@Nonnegative
                                     int nIndex,
                                     @Nullable
                                     String sCellText)
        Add a single cell with the given text element.
        Parameters:
        nIndex - The index where the cell should be added
        sCellText - The text to be set into the cell. May be null.
        Returns:
        this (the table row)
      • addCellAt

        @Nonnull
        public final HCRow addCellAt​(@Nonnegative
                                     int nIndex,
                                     @Nullable
                                     IHCNode aChild)
        Add a single new cell and add the passed element.
        Parameters:
        nIndex - The index where the cell should be added
        aChild - The element to add. May be null.
        Returns:
        this (the table row)
      • addCellAt

        @Nonnull
        public final HCRow addCellAt​(@Nonnegative
                                     int nIndex,
                                     @Nullable
                                     String... aCellChildren)
        Add a single new cell and add the passed texts.
        Parameters:
        nIndex - The index where the cell should be added
        aCellChildren - The list of texts to add. May be null.
        Returns:
        this (the table row)
      • addCellAt

        @Nonnull
        public final HCRow addCellAt​(@Nonnegative
                                     int nIndex,
                                     @Nullable
                                     IHCNode... aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        nIndex - The index where the cell should be added
        aCellChildren - The list of elements to add. May be null.
        Returns:
        this (the table row)
      • addCellAt

        @Nonnull
        public final HCRow addCellAt​(@Nonnegative
                                     int nIndex,
                                     @Nullable
                                     Iterable<? extends IHCNode> aCellChildren)
        Add a single new cell and add the passed elements.
        Parameters:
        nIndex - The index where the cell should be added
        aCellChildren - The list of elements to add. May be null.
        Returns:
        this (the table row)
      • addCells

        @Nonnull
        public final HCRow addCells​(@Nullable
                                    String... aCellTexts)
        Add multiple cells, one for each passed string.
        Parameters:
        aCellTexts - The list of strings for which a table cell should be created.
        Returns:
        this (the table row)
      • addCells

        @Nonnull
        public final HCRow addCells​(@Nullable
                                    IHCNode... aCellChildren)
        Add multiple cells, one for each passed element.
        Parameters:
        aCellChildren - The list of elements for which new cells should be created. May be null.
        Returns:
        this (the table row)
      • addCells

        @Nonnull
        public final HCRow addCells​(@Nullable
                                    Iterable<? extends IHCNode> aCellChildren)
        Add multiple cells, one for each passed element.
        Parameters:
        aCellChildren - The list of elements for which new cells should be created. May be null.
        Returns:
        this (the table row)
      • getCellAtIndex

        @Nullable
        public final IHCCell<?> getCellAtIndex​(int nIndex)
        Get the cell at the specified index in this row. This method does NOT consider colspans!!!!
        Parameters:
        nIndex - The index of the cell
        Returns:
        null if no such cell is present
      • getCellAtEffectiveIndex

        @Nullable
        public final IHCCell<?> getCellAtEffectiveIndex​(int nIndex)
        Get the cell at the specified index in this row. This method does consider colspans!!!!
        Parameters:
        nIndex - The index of the cell. Should be ≥ 0.
        Returns:
        null if no such cell is present
      • getCellCount

        @Nonnegative
        public final int getCellCount()
        Note: this method only counts the effective cells and does NOT include eventually contained "colspans"!
        Returns:
        The number of contained cells.
      • getEffectiveCellCount

        @Nonnegative
        public final int getEffectiveCellCount()
        Count the number of effective cells - including "colspans" - of this row.
        Returns:
        The number of effectively contained cells. Always ≥ 0.
      • removeCellAt

        @Nonnull
        public final HCRow removeCellAt​(@Nonnegative
                                        int nIndex)
        Remove the cell at the specified index
        Parameters:
        nIndex - The index to remove
        Returns:
        this
      • isColspanUsed

        public final boolean isColspanUsed()
        Returns:
        true if at least one contained cell uses a colspan.
      • isRowspanUsed

        public final boolean isRowspanUsed()
        Returns:
        true if at least one contained cell uses a rowspan.