Class Table


  • public final class Table
    extends Object
    This is a table representation for textual table output. It should be guaranteed that the header object has the same number of entries as all contents string arrays.
    Author:
    BaseX Team 2005-23, BSD License, Christian Gruen
    • Field Detail

      • header

        public final TokenList header
        Table header.
      • align

        public final BoolList align
        Alignment (false: left, true: right alignment).
      • description

        public String description
        Data description; if available, will be added as footer.
    • Constructor Detail

      • Table

        public Table()
        Default constructor.
      • Table

        public Table​(String input)
        Constructor with table input.
        Parameters:
        input - textual table input
    • Method Detail

      • sort

        public Table sort()
        Sorts the table by the first column.
        Returns:
        self reference
      • toTop

        public Table toTop​(byte[] top)
        Moves the specified string to top.
        Parameters:
        top - entry to be moved to the top
        Returns:
        self reference
      • finish

        public byte[] finish()
        Returns a textual representation of the table.
        Returns:
        text