Class Table

java.lang.Object
org.basex.util.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-21, BSD License, Christian Gruen
  • Field Details

    • align

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

      public final ArrayList<TokenList> contents
      Table contents.
    • description

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

    • Table

      public Table()
      Default constructor.
    • Table

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

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object