Class Tree.Leaf<T>
java.lang.Object
uk.ac.starlink.vo.Tree<T>
uk.ac.starlink.vo.Tree.Leaf<T>
Tree instance that contains a referenced item and no children.
- 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.getItem()Returns the item referenced by this leaf.booleanisLeaf()Returns true if this instance is a Leaf, false if it's a Branch.<R> Tree.Leaf<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
-
Leaf
-
-
Method Details
-
getItem
-
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.
-