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 for Description. 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 Details

    • DescriptionBuilder

      public DescriptionBuilder()
  • Method Details

    • 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 given InlineElement. For example:

      text("This is a text with a link %s", link("https://somepage", "to here"))

      Parameters:
      format - text with placeholders for elements
      elements - elements to be put in the text
      Returns:
      description with added block of text
    • text

      Creates a simple block of text.
      Parameters:
      text - a simple block of text
      Returns:
      block of text
    • add

      public Description.DescriptionBuilder add(org.apache.flink.configuration.description.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.