Class TreeNode<T>
java.lang.Object
de.captaingoldfish.scim.sdk.common.tree.TreeNode<T>
a simple representation of a tree node
- Since:
- 25.03.2022
- Author:
- Pascal Knueppel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd a child to this nodevoidaddChildren(TreeNode<T>... children) adds several children at oncevoidadd a parent to this nodevoidaddParents(TreeNode<T>... parents) add several parents at oncevoidremoves this node from its parents and forgets its own parentsgetValue()this node itselfbooleanisLeaf()if this node is a leaf or notbooleanisRoot()if this node is a root-node or notvoidremoveChild(TreeNode<T> child) remove a child from this node.voidremoveChildren(TreeNode<T>... children) removes several children at oncevoidremoveParent(TreeNode<T> parent) remove a parent from this nodevoidremoveParents(TreeNode<T>... parents) removes several parents at oncetoString()
-
Constructor Details
-
TreeNode
-
-
Method Details
-
isRoot
public boolean isRoot()if this node is a root-node or not -
isLeaf
public boolean isLeaf()if this node is a leaf or not -
addParents
add several parents at once -
addParent
add a parent to this node -
removeParents
removes several parents at once -
removeParent
remove a parent from this node -
addChildren
adds several children at once -
addChild
add a child to this node -
removeChildren
removes several children at once -
removeChild
remove a child from this node. If this child has many parents it will not be removed from the tree though -
getParents
- See Also:
-
parents
-
getChildren
- See Also:
-
children
-
getAllBranchNodes
- Returns:
- the nodes from the whole branch of this node
-
clearParents
public void clearParents()removes this node from its parents and forgets its own parents -
toString
-
getValue
this node itself
-