|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.expasy.jpl.commons.collection.tree.TreeNodeImpl<T>
T - data type.public final class TreeNodeImpl<T>
Naive tree node.
| Method Summary | ||
|---|---|---|
void |
addChild(TreeNode<T> child)
Add the given child to the node. |
|
boolean |
equals(Object o)
|
|
TreeNode<T> |
getChildAt(int index)
|
|
List<TreeNode<T>> |
getChildren()
|
|
T |
getData()
|
|
Set<TreeNode<T>> |
getLeaves()
|
|
Set<TreeNode<T>> |
getNodes()
|
|
int |
getNumberOfChildren()
|
|
TreeNode<T> |
getParent()
|
|
int |
hashCode()
|
|
boolean |
isLeave()
|
|
boolean |
isRoot()
|
|
static
|
newNode(T data,
TreeNode<T> parent)
|
|
static
|
newRoot(T data)
|
|
void |
setData(T data)
Set the data to this node. |
|
void |
setParent(TreeNode<T> parent)
Set the parent node. |
|
String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static <T> TreeNodeImpl<T> newRoot(T data)
public static <T> TreeNodeImpl<T> newNode(T data,
TreeNode<T> parent)
public final TreeNode<T> getParent()
getParent in interface TreeView<T>public void setParent(TreeNode<T> parent)
TreeNode
setParent in interface TreeNode<T>public final List<TreeNode<T>> getChildren()
getChildren in interface TreeView<T>public final Set<TreeNode<T>> getLeaves()
getLeaves in interface TreeView<T>public final Set<TreeNode<T>> getNodes()
getNodes in interface TreeView<T>public final int getNumberOfChildren()
getNumberOfChildren in interface TreeView<T>public final boolean isRoot()
isRoot in interface TreeView<T>public final boolean isLeave()
isLeave in interface TreeView<T>public void addChild(TreeNode<T> child)
TreeNode
addChild in interface TreeNode<T>
public final TreeNode<T> getChildAt(int index)
throws IndexOutOfBoundsException
getChildAt in interface TreeView<T>IndexOutOfBoundsExceptionpublic final T getData()
getData in interface TreeView<T>public void setData(T data)
TreeNode
setData in interface TreeNode<T>public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||