Class Format.Block

All Implemented Interfaces:
Formattable, Serializable, Cloneable
Enclosing class:
Format

public static class Format.Block extends Format.Compound
Prints all sub-formats in the same line as long as possible, and starts a new line for every sub-format which would (probably) exceeded the page width. An explicitly set indentation value of an immediate child is inherited to all successors.
See Also:
  • Constructor Details

    • Block

      protected Block(List<Format> f)
      Constructor used by the factory methods.
    • Block

      protected Block(int i, int a, boolean m, boolean g, int ind, List<Format> f)
      Constructor used only internally by the cloning methods.
  • Method Details

    • constructor

      public CompoundConstructor constructor()
      Description copied from class: Format.Compound
      Delivers the reification of the constructor. That enum type has "apply()" methods which generate a corresponding instance. This is used for the implementation of "clone-with-overwrite", etc.
      Specified by:
      constructor in class Format.Compound
    • mutate

      public Format.Block mutate(Consumer<List<Format>> mapSubs)
      Description copied from class: Format.Compound
      Creates a new instance of the same class as this, with sub-formats altered by the given consumer function.
      Specified by:
      mutate in class Format.Compound
    • doprint

      protected void doprint(Format.FormatPrinter v)
      Description copied from class: Format
      Over-ridden by all sub-classes of Format, for performing the adquate print operations. To be printed is the raison d'ĂȘtre of Format objects. These methods do not use the Visitor/Matcher framework, but direct method invocation and basic method dispatch for descending to child nodes.
      Specified by:
      doprint in class Format