Class Tabular

All Implemented Interfaces:
Formattable, Serializable, Cloneable

public class Tabular extends Compound
Realizes one line of a table, and prints sub-formats starting in the relative column indicated by the value of their Compound.indent(int). Whenever this would result in overlap or adjacency, then a newline is inserted.
See Also:
  • Constructor Details

    • Tabular

      protected Tabular(List<Format> f)
      Constructor. In contrast to the factory methods, denormalized instances be constructed.
      Parameters:
      f - the formats forming the tabular line.
    • Tabular

      protected Tabular(Format... f)
      A constructor with some field values explicit, some calculated from the subformats. In contrast to the factory methods, denormalized instances may be constructed.
      Parameters:
      f - the formats forming the tabular line.
    • Tabular

      protected Tabular(int i, int a, boolean m, boolean g, int ind, List<Format> f)
      The constructor which sets all field values explicitly. Consistency of the attributes must be realized by the caller. In contrast to the factory methods, denormalized instances may be constructed.
      Parameters:
      i - minimal width
      a - maximal width
      m - is always multiLine
      g - is ground
      ind - indentation
      f - the formats forming the tabular line.
      Throws:
      IllegalArgumentException - if ident value not valid, see Format.checkValidIndent(int)
  • Method Details

    • constructor

      public CompoundConstructor constructor()
      Description copied from class: Compound
      Returns the reification of the constructor of this instance. That enum type has "apply()" methods which generate a corresponding instance.
      Specified by:
      constructor in class Compound
      Returns:
      the reification of the constructor of this instance.
    • mutate

      public Format mutate(Consumer<List<Format>> mapSubs)
      Description copied from class: Compound
      Creates a new instance of the same class as this instance, or an optimized variant. which contains as subformats all formats in a modified list. The list is modified arbitrarily in an "imperative" way, i.e. it can be altered or extended or totally cleared.

      The resulting list is fed into a factory method; therefore optimization applies and the returned type can be the singleton contents or an instance of Empty.

      Overrides:
      mutate in class Compound
      Parameters:
      mapSubs - the code to apply to the list of all subformats
      Returns:
      a new format which contains the all formats in the modified list
    • doprint

      protected void doprint(FormatPrinter v)
      Description copied from class: Format
      Over-ridden by all sub-classes of Format, for performing the print operations.
      Specified by:
      doprint in class Format
      Parameters:
      v - realizes the dynamic context for printing