Class Format.Space

java.lang.Object
eu.bandm.tools.format.Format
eu.bandm.tools.format.Format.Space
All Implemented Interfaces:
Formattable, Serializable, Cloneable
Enclosing class:
Format

public static class Format.Space extends Format
Causes horizontal space (of variable width) when in the middle of a line, or one single blank line (independent of its width) when in vertical stack. Does not print horizontally at a start of a linee --- for this there is indent(int).
See Also:
  • Constructor Details

    • Space

      protected Space(int i)
      Create a space format of the given width and unspecified indentation.
    • Space

      protected Space(int i, int indent)
      Create a space format of the given width.
  • Method Details

    • isSpace

      protected boolean isSpace()
      Description copied from class: Format
      Whether this format is a space.
      Overrides:
      isSpace in class Format
    • indent

      public Format.Space indent(int i)
      Description copied from class: Format
      Returns a clone of this with the new value of Format.indent. (The built-in "clone()" functionality cannot be used, since field "indent" is final).
      Specified by:
      indent in class Format
    • 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
    • debugPrefix

      public String debugPrefix(int n)
      Description copied from class: Format
      Overridden by subclasses to deliver a printable representation for debugging purpose.
      Specified by:
      debugPrefix in class Format
      Parameters:
      n - the maximal number of characters