Package com.nomagic.text.builders
Class PlainOrFullHtmlTextBuilder<T extends PlainOrFullHtmlTextBuilder>
java.lang.Object
com.nomagic.text.builders.AbstractTextBuilder<T>
com.nomagic.text.builders.PlainOrFullHtmlTextBuilder<T>
- All Implemented Interfaces:
TextBuilder<T>
@OpenApiAll
public class PlainOrFullHtmlTextBuilder<T extends PlainOrFullHtmlTextBuilder>
extends AbstractTextBuilder<T>
A builder used for plain or html text building. Colored fragments are not supported.
Output text format depends on input text format - if at least one html fragment added, result will be html, otherwise result will be plain text.
Note - "light" html fragments will be converted to a plain text.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.nomagic.text.builders.AbstractTextBuilder
append, appendColor, appendToText, isTextAdded, prepend, prependColor, prependToText, replaceText, setText, textLengthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.nomagic.text.builders.TextBuilder
append, appendWithNoWrap, appendWithSpace, appendWithSpace, compress, isColorSupported, isPlainTextEmpty, prepend, prependWithNoWrap, setColor, setText
-
Constructor Details
-
PlainOrFullHtmlTextBuilder
public PlainOrFullHtmlTextBuilder()
-
-
Method Details
-
toAppendableText
- Overrides:
toAppendableTextin classAbstractTextBuilder<T extends PlainOrFullHtmlTextBuilder>
-
toString
- Specified by:
toStringin interfaceTextBuilder<T extends PlainOrFullHtmlTextBuilder>- Overrides:
toStringin classAbstractTextBuilder<T extends PlainOrFullHtmlTextBuilder>- Returns:
- result string
-
toPlainText
- Returns:
- result string as plain text
-