Interface FormatProvider<F>

Type Parameters:
F - the type of format objects to produce
All Known Implementing Classes:
FormatProviderImpl, FormatProxy, FormatServer

public interface FormatProvider<F>
Implementations have the capability to produce pretty-printing format objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    append(List<? extends F> elems)
    Returns a compound format object that concatenates the given elements horizontally with absolute indentation.
    beneath(List<? extends F> elems)
    Returns a compound format object that concatenates the given elements vertically.
    beside(List<? extends F> elems)
    Returns a compound format object that concatenates the given elements horizontally with relative indentation.
    block(List<? extends F> elems)
    Returns a compound format object that concatenates the given elements first horizontally and then vertically.
    line(List<? extends F> elems)
    Returns a compound format object that concatenates the given elements either horizontally or vertically.
    Returns an atomic format object that displays the given string.
    space(int width)
    Returns an atomic format object that displays breakable whitespace.
  • Method Details

    • literal

      F literal(String text)
      Returns an atomic format object that displays the given string.

      If the given string contains whitespace, that will not be considered for line breaks.

      Parameters:
      text - the string to display
      Returns:
      an atomic format object that displays the given string
    • space

      F space(int width)
      Returns an atomic format object that displays breakable whitespace.
      Parameters:
      width - the number of whitespace characters to display
      Returns:
      an atomic format object that displays breakable whitespace of the given width
    • append

      F append(List<? extends F> elems)
      Returns a compound format object that concatenates the given elements horizontally with absolute indentation.
      Parameters:
      elems - the format subobjects to concatenate
      Returns:
      a concatenated compound format object
    • beside

      F beside(List<? extends F> elems)
      Returns a compound format object that concatenates the given elements horizontally with relative indentation.
      Parameters:
      elems - the format subobjects to concatenate
      Returns:
      a concatenated compound format object
    • beneath

      F beneath(List<? extends F> elems)
      Returns a compound format object that concatenates the given elements vertically.
      Parameters:
      elems - the format subobjects to concatenate
      Returns:
      a concatenated compound format object
    • line

      F line(List<? extends F> elems)
      Returns a compound format object that concatenates the given elements either horizontally or vertically.
      Parameters:
      elems - the format subobjects to concatenate
      Returns:
      a concatenated compound format object
    • block

      F block(List<? extends F> elems)
      Returns a compound format object that concatenates the given elements first horizontally and then vertically.
      Parameters:
      elems - the format subobjects to concatenate
      Returns:
      a concatenated compound format object