Class TextBuilder

java.lang.Object
com.pnfsoftware.jeb.util.format.TextBuilder
All Implemented Interfaces:
Appendable
Direct Known Subclasses:
XmlBuilder

public class TextBuilder extends Object implements Appendable
A text buffer builder supporting indentation. Can be seen as an alternative to StringBuilder to easily create structured documents.

This class may be sub-classed, in particular, refer to XmlBuilder for XML documents.

  • Constructor Details

    • TextBuilder

      public TextBuilder()
      Create a builder with a default indentation size of 4 characters and an initial capacity of 16 characters.
    • TextBuilder

      public TextBuilder(int indentationSize)
      Create a builder with an initial capacity of 16 characters.
    • TextBuilder

      public TextBuilder(int indentationSize, int initialCapacity)
      Create a builder.
  • Method Details