Package com.appiancorp.suiteapi.common
Class TreePivot
java.lang.Object
com.appiancorp.suiteapi.common.TreePivot
- All Implemented Interfaces:
Serializable
Represents a view of a tree from the position of a node in the tree.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionTreeNode[]
Get the route from the root of the tree to the node.Get the tree starting a this node.void
populateBreadcrumbs
(Object[] data_) Convenience method to populate node data in breadcrumb nodes.void
setBreadcrumbs
(TreeNode[] breadcrumbs) Set the route from the root of the tree to the node.void
setSubtree
(Tree node_) Set the tree starting a this node.
-
Constructor Details
-
TreePivot
public TreePivot()
-
-
Method Details
-
getBreadcrumbs
Get the route from the root of the tree to the node. Breadcrumbs are the ancestors of this node, up to and including the root of the tree.- Returns:
- the ancestors of this node.
- See Also:
-
setBreadcrumbs
Set the route from the root of the tree to the node.- See Also:
-
getSubtree
Get the tree starting a this node. This is a subtree of the overall tree.- Returns:
- the subtree
- See Also:
-
setSubtree
Set the tree starting a this node. This is a subtree of the overall tree.- Parameters:
node_
- a tree to install as the subtree- See Also:
-
populateBreadcrumbs
Convenience method to populate node data in breadcrumb nodes. Data array should parallel breadcrumb array.- Parameters:
data_
- the data to put in the breadcrumbs
-