Package lib.aide.paths
Class PathsHtml.Builder<C,P>
java.lang.Object
lib.aide.paths.PathsHtml.Builder<C,P>
Builder class to configure and create an instance of PathsHtml.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the PathsHtml instance.indentLines(String indent) Sets the line indentation.indentTags(String indent) Sets the tag indentation.leafNodeHtmlContent(Function<Paths<C, P>.Node, PathsHtml.HtmlContent> leafNodeHtmlContent) Sets the function to generate HtmlContent for leaf nodes.parentNodeHtmlContent(Function<Paths<C, P>.Node, PathsHtml.HtmlContent> parentNodeHtmlContent) Sets the function to generate HtmlContent for parent nodes.Sets the function to generate HTML-friendly IDs.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
leafNodeHtmlContent
public PathsHtml.Builder<C,P> leafNodeHtmlContent(Function<Paths<C, P>.Node, PathsHtml.HtmlContent> leafNodeHtmlContent) Sets the function to generate HtmlContent for leaf nodes.- Parameters:
leafNodeHtmlContent- the function to generate HtmlContent for leaf nodes- Returns:
- the Builder instance
-
parentNodeHtmlContent
public PathsHtml.Builder<C,P> parentNodeHtmlContent(Function<Paths<C, P>.Node, PathsHtml.HtmlContent> parentNodeHtmlContent) Sets the function to generate HtmlContent for parent nodes.- Parameters:
parentNodeHtmlContent- the function to generate HtmlContent for parent nodes- Returns:
- the Builder instance
-
withIds
Sets the function to generate HTML-friendly IDs.- Parameters:
htmlFriendlyId- the function to generate HTML-friendly IDs- Returns:
- the Builder instance
-
indentLines
Sets the line indentation.- Parameters:
indent- the line indentation string- Returns:
- the Builder instance
-
indentTags
Sets the tag indentation.- Parameters:
indent- the tag indentation string- Returns:
- the Builder instance
-
build
Builds the PathsHtml instance.- Returns:
- the PathsHtml instance
-