All Implemented Interfaces:
ICompositeElement, IContainer, IElement, Serializable
Direct Known Subclasses:
TableRow

public class TableHeader extends TableElement
This class is used to define a table header. For internal use only. The TableBuilder class may be used to create a table container structure.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • TableHeader

      public TableHeader(Serializable[] cells)
      Constructs the table header with an array of cells.
      Parameters:
      cells - The cells that should be used in the header.
    • TableHeader

      protected TableHeader(TableHeader other, boolean duplicateContents)
    • TableHeader

      public TableHeader(Serializable[] cells, String style)
      Constructs the table header with an array of cells.
      Parameters:
      cells - The cells that should be used in the header.
      style - The style that should be used for the row.
  • Method Details

    • getColumnCount

      public int getColumnCount()
      This method returns the number of columns of this row.
      Returns:
      the number of columns of this row.
    • getCellCount

      public int getCellCount()
      This method returns the number of cells of this row. The number of cells is equal or less than the number of columns.
      Returns:
      the number of cells of this row.
    • addCell

      public void addCell(TableCell tableCell)
    • getCellAt

      public TableCell getCellAt(int index)
      This method returns the cell at the specified index.
      Parameters:
      index - The index of the requested cell.
      Returns:
      The cell at the requested index.
    • getCells

      public TableCell[] getCells()
      This method returns an array containing all the cells of the row.
      Returns:
      an array containing all the cells of the row.
    • accept

      public IVisitor accept(IVisitor visitor)
      Description copied from class: Element
      This method will invoke the visitor for this runtime element.
      Specified by:
      accept in interface ICompositeElement
      Specified by:
      accept in interface IElement
      Overrides:
      accept in class TableElement
      Parameters:
      visitor - The visitor that should be invoked.
      Returns:
      The visitor passed to this method.
    • equals

      public boolean equals(Object other)
      Description copied from class: Container
      Compare this container to another (not its elements, @see CompositeElement.equalsContent(com.aquima.interactions.composer.ICompositeElement) to compare its elements).
      Overrides:
      equals in class Container
      Parameters:
      other - The object this instance should be compared to.
      Returns:
      boolean indicating if the object is considered equal to this instance.
    • equalsContent

      public boolean equalsContent(ICompositeElement other)
      This methods checks if this table header equals the content of another table header. The content will be checked recursive, for example if a table cell contains a container which contains a sub container which contains a field with a different value false will be returned. If other is no instance of Table false is returned.
      Specified by:
      equalsContent in interface ICompositeElement
      Overrides:
      equalsContent in class CompositeElement
      Parameters:
      other - Table to compare to
      Returns:
      boolean if content of this table equals the content of another table.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Container
    • duplicate

      public Element duplicate()
      Description copied from class: Container
      This method duplicates the container element.
      Specified by:
      duplicate in interface IElement
      Overrides:
      duplicate in class TableElement
      Returns:
      A clone of this element.