Class TextElement
java.lang.Object
ai.dat.core.configuration.description.TextElement
- All Implemented Interfaces:
BlockElement,InlineElement
Represents a text block in the
Description.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumStyles that can be applied toTextElemente.g. code, bold etc. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextElementCreates a block of text formatted as code.voidstatic TextElementCreates a simple block of text.static TextElementtext(String format, InlineElement... elements) Creates a block of text with placeholders ("%s") that will be replaced with proper string representation of givenInlineElement.static InlineElementwrap(InlineElement... elements) Wraps a list ofInlineElements into a singleTextElement.
-
Method Details
-
text
Creates a block of text with placeholders ("%s") that will be replaced with proper string representation of givenInlineElement. For example:text("This is a text with a link %s", link("https://somepage", "to here"))- Parameters:
format- text with placeholders for elementselements- elements to be put in the text- Returns:
- block of text
-
text
Creates a simple block of text.- Parameters:
text- a simple block of text- Returns:
- block of text
-
wrap
Wraps a list ofInlineElements into a singleTextElement. -
code
Creates a block of text formatted as code.- Parameters:
text- a block of text that will be formatted as code- Returns:
- block of text formatted as code
-
getStyles
-
format
-