Class Tree<A>
java.lang.Object
org.eclipse.milo.opcua.stack.core.util.Tree<A>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetValue()<B> Tree<B>Map this tree into a new tree using the transformationf.voidTraverse this tree consuming thevalueat each node.voidtraverseNodes(Consumer<Tree<A>> c) Traverse this tree consuming eachTreenode.voidTraverse this tree consuming thevalueand current depth at each node.voidtraverseWithDepth(BiConsumer<A, Integer> c, Comparator<Tree<A>> comparator) Traverse this tree consuming thevalueand current depth at each node.voidTraverse this tree consuming pairs of (value,parent.value).
-
Constructor Details
-
Tree
-
-
Method Details
-
addChild
-
addChild
-
getParent
-
getChildren
-
getValue
-
traverse
Traverse this tree consuming thevalueat each node.- Parameters:
c- the valueConsumer.
-
traverseNodes
Traverse this tree consuming eachTreenode.- Parameters:
c- the nodeConsumer.
-
traverseWithDepth
Traverse this tree consuming thevalueand current depth at each node.- Parameters:
c- the value and depthBiConsumer.
-
traverseWithDepth
Traverse this tree consuming thevalueand current depth at each node.- Parameters:
c- the value and depthBiConsumer.comparator- aComparatorto sort the children of each node.
-
traverseWithParent
Traverse this tree consuming pairs of (value,parent.value).parent.valuemay be null if this node is the root.- Parameters:
c- theBiConsumer.
-
map
Map this tree into a new tree using the transformationf.- Type Parameters:
B- the new type.- Parameters:
f- a function that transforms fromAtoB.- Returns:
- a new tree in which the values have been mapped from
AtoBusingf.
-