Package eu.bandm.tools.location
Class LocationTree.Builder<D,T>
java.lang.Object
eu.bandm.tools.location.LocationTree.Builder<D,T>
- Type Parameters:
D- the type of document identifiersT- the type of subjects
- Enclosing class:
LocationTree<D,T>
Builder for a subtree structure.
-
Method Summary
Modifier and TypeMethodDescriptionAdds a branching node to the tree under construction.Adds a leaf node with a proper subtree to the tree under construction.
-
Method Details
-
addLeaf
Adds a leaf node with a proper subtree to the tree under construction.This method is chainable.
- Parameters:
label- the label of the leafcontent- a functional object that provides the proper subtree- Returns:
this
-
addBranch
public LocationTree.Builder<D,T> addBranch(String label, Consumer<? super LocationTree.Builder<D, T>> branching) Adds a branching node to the tree under construction.This method is chainable.
- Parameters:
label- the label of the branching nodebranching- a functional object that populates the branches- Returns:
this
-