Class PlainTextBuilder<T extends PlainTextBuilder>

java.lang.Object
com.nomagic.text.builders.AbstractTextBuilder<T>
com.nomagic.text.builders.PlainTextBuilder<T>
All Implemented Interfaces:
TextBuilder<T>

@OpenApiAll public class PlainTextBuilder<T extends PlainTextBuilder> extends AbstractTextBuilder<T>
A builder used for plain text building. Any text fragments will be transformed to a plain text. Colored fragments are not supported.
  • Constructor Details

    • PlainTextBuilder

      public PlainTextBuilder()
  • Method Details

    • toAppendableText

      protected String toAppendableText(String text)
      Overrides:
      toAppendableText in class AbstractTextBuilder<T extends PlainTextBuilder>
    • compress

      public void compress(int textLength)
      Description copied from interface: TextBuilder
      Compress current text to the given length. This function is not supported in every implementation, so it can be ignored.
      Parameters:
      textLength - text length
    • toPlainText

      public String toPlainText()
      Returns:
      result string as plain text
    • isPlainTextEmpty

      public boolean isPlainTextEmpty()
      Returns:
      true if text converted to a plain is empty in this builder