Interface ITreeNode<T>
-
- Type Parameters:
T- the generic type
- All Superinterfaces:
javax.swing.tree.TreeModel
- All Known Implementing Classes:
AbstractGenericTreeNode
public interface ITreeNode<T> extends javax.swing.tree.TreeModelThe Interface ITreeNode.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddChild(ITreeNode<T> child)Adds the child.voidaddChildAt(int index, ITreeNode<T> child)Adds the child.booleanequals(ITreeNode<T> treeNode)Equals.intgetChildCount()Gets the child count.java.util.List<ITreeNode<T>>getChildren()Gets the children.TgetValue()Gets the value.booleanhasChildren()Checks for children.booleanisLeaf()Checks if is leaf.booleanisNode()Checks if is node.voidremoveChild(ITreeNode<T> child)Removes the child.voidremoveChildAt(int index)Removes the child.voidsetChildren(java.util.List<ITreeNode<T>> children)Sets the children.voidsetValue(T value)Sets the value.java.util.List<ITreeNode<T>>toList()To list.voidtraverse(ITreeNode<T> node, java.util.List<ITreeNode<T>> list)Traverse.
-
-
-
Method Detail
-
addChildAt
void addChildAt(int index, ITreeNode<T> child) throws java.lang.IndexOutOfBoundsExceptionAdds the child.- Parameters:
index- the indexchild- the child- Throws:
java.lang.IndexOutOfBoundsException- the index out of bounds exception
-
equals
boolean equals(ITreeNode<T> treeNode)
Equals.- Parameters:
treeNode- the tree node- Returns:
- true, if successful
-
getChildCount
int getChildCount()
Gets the child count.- Returns:
- the child count
-
getValue
T getValue()
Gets the value.- Returns:
- the value
-
hasChildren
boolean hasChildren()
Checks for children.- Returns:
- true, if successful
-
isLeaf
boolean isLeaf()
Checks if is leaf.- Returns:
- true, if is leaf
-
isNode
boolean isNode()
Checks if is node.- Returns:
- true, if is node
-
removeChildAt
void removeChildAt(int index) throws java.lang.IndexOutOfBoundsExceptionRemoves the child.- Parameters:
index- the index- Throws:
java.lang.IndexOutOfBoundsException- the index out of bounds exception
-
setChildren
void setChildren(java.util.List<ITreeNode<T>> children)
Sets the children.- Parameters:
children- the new children
-
setValue
void setValue(T value)
Sets the value.- Parameters:
value- the new value
-
-