Class Tree.Branch<T>
java.lang.Object
uk.ac.starlink.vo.Tree<T>
uk.ac.starlink.vo.Tree.Branch<T>
Tree instance that contains a list of children and no referenced item.
- Since:
- 19 Jan 2023
- Author:
- Mark Taylor
-
Nested Class Summary
Nested classes/interfaces inherited from class Tree
Tree.Branch<T>, Tree.Leaf<T> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasBranch()Returns this instance as a Branch if it's a branch, or null if it's a leaf.asLeaf()Returns this instance as a Leaf if it's a leaf, or null if it's a branch.Returns this branch's children.getLabel()Returns this branch's label.booleanisLeaf()Returns true if this instance is a Leaf, false if it's a Branch.<R> Tree.Branch<R> Recursively converts this Tree to one with the same structure, but with the leaf items mapped from their existing values to new values determined by a supplied mapping function.
-
Constructor Details
-
Branch
-
-
Method Details
-
getChildren
-
getLabel
-
isLeaf
-
asLeaf
-
asBranch
-
map
Description copied from class:TreeRecursively converts this Tree to one with the same structure, but with the leaf items mapped from their existing values to new values determined by a supplied mapping function.
-