Interface ModelFilterTreesContextReadOnly.FilterTree
- All Known Subinterfaces:
ModelFilterTreesContextReadWrite.MutableFilterTree
- Enclosing interface:
ModelFilterTreesContextReadOnly
public static interface ModelFilterTreesContextReadOnly.FilterTree
Represents a tree that can be fetched in various manners.
-
Method Summary
Modifier and TypeMethodDescriptionfetch()
Fetch the whole tree.fetchBranch
(long leafId) Fetch one branch of the tree, starting from the given node up to the root.name()
-
Method Details
-
name
String name()- Returns:
- the name of this tree
- Since:
- 9.0 Hurricane
-
fetch
Fetch the whole tree.Can be walked down via the children and up via the parent.
- Returns:
- the root node
- Since:
- 9.0 Hurricane
-
fetchBranch
Fetch one branch of the tree, starting from the given node up to the root.Can be walked up via the parent of the nodes and down via the (unique) child of the nodes.
For example, given the following tree:
- root (id=1)
- a (id=2)
- c (id=4)
- d (id=5)
- b (id=3)
- e (id=6)
- f (id=7)
- a (id=2)
tree.fetchBranch(5)
will fetch:- root (id=1)
- a (id=2)
- d (id=5)
- a (id=2)
d
tree.fetchBranch(3)
will fetch:- root (id=1)
- b (id=3)
b
- Parameters:
leafId
- the id of the starting node for the branch- Returns:
- the leaf of the fetched branch
- Since:
- 9.0 Hurricane
- root (id=1)
-