T - the generic typepublic interface ITreeNode<T> extends Serializable
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(ITreeNode<T> child)
Adds the child.
|
void |
addChildAt(int index,
ITreeNode<T> child)
Adds the child.
|
boolean |
equals(ITreeNode<T> treeNode)
Equals.
|
List<ITreeNode<T>> |
getAllSiblings()
Returns all siblings of this node in the parent's children list.
|
int |
getChildCount()
Gets the child count.
|
List<ITreeNode<T>> |
getChildren()
Gets the children.
|
int |
getDepth()
Returns the depth of the tree beginning at this node Returns 0 if this node has no children.
|
String |
getDisplayValue()
Gets the optional display value.
|
int |
getLevel()
Returns the distance from the root to this node.
|
ITreeNode<T> |
getNextSibling()
Returns the next sibling of this node in the parent's children list.
|
ITreeNode<T> |
getParent()
Gets the parent.
|
ITreeNode<T> |
getPreviousSibling()
Returns the previous sibling of this node in the parent's children list.
|
T |
getValue()
Gets the value.
|
boolean |
hasChildren()
Checks for children.
|
boolean |
hasParent()
Checks for parent.
|
boolean |
isLeaf()
Checks if is leaf.
|
boolean |
isNode()
Checks if is node.
|
boolean |
isRoot()
Checks if this treenode is root.
|
void |
removeChild(ITreeNode<T> child)
Removes the child.
|
void |
removeChildAt(int index)
Removes the child.
|
void |
setChildren(List<ITreeNode<T>> children)
Sets the children.
|
void |
setDisplayValue(String displayValue)
Sets the optional display value.
|
void |
setParent(ITreeNode<T> parent)
Sets the parent.
|
void |
setValue(T value)
Sets the value.
|
List<ITreeNode<T>> |
toList()
To list.
|
void |
traverse(ITreeNode<T> node,
List<ITreeNode<T>> list)
Traverse.
|
String getDisplayValue()
void setDisplayValue(String displayValue)
displayValue - the new optional display valuevoid addChildAt(int index,
ITreeNode<T> child)
throws IndexOutOfBoundsException
index - the indexchild - the childIndexOutOfBoundsException - the index out of bounds exceptionboolean equals(ITreeNode<T> treeNode)
treeNode - the tree nodeint getChildCount()
T getValue()
boolean hasChildren()
boolean hasParent()
boolean isLeaf()
boolean isNode()
boolean isRoot()
void removeChildAt(int index)
throws IndexOutOfBoundsException
index - the indexIndexOutOfBoundsException - the index out of bounds exceptionvoid setChildren(List<ITreeNode<T>> children)
children - the new childrenvoid setValue(T value)
value - the new valuevoid traverse(ITreeNode<T> node, List<ITreeNode<T>> list)
node - the nodelist - the listITreeNode<T> getNextSibling()
ITreeNode<T> getPreviousSibling()
List<ITreeNode<T>> getAllSiblings()
int getLevel()
int getDepth()
Copyright © 2015 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.