Class Description.DescriptionBuilder
- java.lang.Object
-
- org.apache.flink.configuration.description.Description.DescriptionBuilder
-
- Enclosing class:
- Description
@PublicEvolving public static class Description.DescriptionBuilder extends Object
Builder forDescription. Allows adding a rich formatting like lists, links, linebreaks etc. For example:Description description = Description.builder() .text("This is some list: ") .list( text("this is first element of list"), text("this is second element of list with a %s", link("https://link"))) .build();
-
-
Constructor Summary
Constructors Constructor Description DescriptionBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Description.DescriptionBuilderadd(BlockElement block)Block of description add.Descriptionbuild()Creates description representation.Description.DescriptionBuilderlinebreak()Creates a line break in the description.Description.DescriptionBuilderlist(InlineElement... elements)Adds a bulleted list to the description.Description.DescriptionBuildertext(String text)Creates a simple block of text.Description.DescriptionBuildertext(String format, InlineElement... elements)Adds a block of text with placeholders ("%s") that will be replaced with proper string representation of givenInlineElement.
-
-
-
Method Detail
-
text
public Description.DescriptionBuilder text(String format, InlineElement... elements)
Adds 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:
- description with added block of text
-
text
public Description.DescriptionBuilder text(String text)
Creates a simple block of text.- Parameters:
text- a simple block of text- Returns:
- block of text
-
add
public Description.DescriptionBuilder add(BlockElement block)
Block of description add.- Parameters:
block- block of description to add- Returns:
- block of description
-
linebreak
public Description.DescriptionBuilder linebreak()
Creates a line break in the description.
-
list
public Description.DescriptionBuilder list(InlineElement... elements)
Adds a bulleted list to the description.
-
build
public Description build()
Creates description representation.
-
-