Class GenericTreeNode<T>
java.lang.Object
org.tasktide.parser.generic_tree.GenericTreeNode<T>
- Type Parameters:
T- - Data Type of Tree
Datapoint of
GenericTree-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear all child nodesGet address of nodeGet the children of current nodegetData()Get value of nodeGet parent of current nodebooleanCheck whether current node has queried childbooleanisLeaf()Check whether current node has children/is leaf nodeFetch names of current nodes childrenbooleanremoveChild(String key) Remove provided key from childrenvoidSet value of nodevoidsetParent(GenericTreeNode<T> parent) Set the parent of current node
-
Constructor Details
-
GenericTreeNode
-
-
Method Details
-
getAddress
-
getData
-
setData
-
getChildren
Get the children of current node- Returns:
- Map-String,
GenericTreeNode
-
getParent
-
setParent
Set the parent of current node- Parameters:
parent-
-
isLeaf
public boolean isLeaf()Check whether current node has children/is leaf node- Returns:
- boolean
-
hasChild
Check whether current node has queried child- Parameters:
query-- Returns:
- boolean
-
listChildren
-
removeChild
Remove provided key from children- Parameters:
key-- Returns:
- boolean
-
clearChildren
public void clearChildren()Clear all child nodes
-