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 Constructor Description PlainOrFullHtmlTextBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
toAppendableText(java.lang.String text)
java.lang.String
toPlainText()
java.lang.String
toString()
-
Methods inherited from class com.nomagic.text.builders.AbstractTextBuilder
append, appendColor, appendToText, isTextAdded, prepend, prependColor, prependToText, replaceText, setText, textLength
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.nomagic.text.builders.TextBuilder
append, appendWithNoWrap, compress, isColorSupported, isPlainTextEmpty, prepend, prependWithNoWrap, setColor, setText
-
-
-
-
Method Detail
-
toAppendableText
protected java.lang.String toAppendableText(java.lang.String text)
- Overrides:
toAppendableText
in classAbstractTextBuilder<T extends PlainOrFullHtmlTextBuilder>
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceTextBuilder<T extends PlainOrFullHtmlTextBuilder>
- Overrides:
toString
in classAbstractTextBuilder<T extends PlainOrFullHtmlTextBuilder>
- Returns:
- result string
-
toPlainText
public java.lang.String toPlainText()
- Returns:
- result string as plain text
-
-