Package alps.java.api.util
Schnittstelle ITreeNode<T>
- Typparameter:
T
-
- Alle bekannten Implementierungsklassen:
TreeNode
public interface ITreeNode<T>
Interface to the tree node class
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Adds a child to the list of child nodesboolean
containsContent
(T compare, ITreeNode<T> node) Checks whether the node contains a given string as content "out"-MethodgetChild
(int index) Returns the child nodesReturns the content of the nodeint
Returns the height of the longest path to a leaf starting from this node.Returns the parent nodegetRoot()
Returns the root node of the current tree nodeboolean
isSubClassOf
(ITreeNode<T> parent) Checks whether the given node is sublcass of a specified node default value of direct is falseboolean
isSubClassOf
(ITreeNode<T> parent, boolean direct) Checks whether the given node is sublcass of a specified nodevoid
setChildNodes
(List<ITreeNode<T>> childNodes) Overrides the current child nodes with a list of new child nodesvoid
setContent
(T content) Sets the content of the nodevoid
setParentNode
(ITreeNode<T> parent) Sets the parent node
-
Methodendetails
-
setParentNode
Sets the parent node- Parameter:
parent
- the parent node
-
setChildNodes
Overrides the current child nodes with a list of new child nodes- Parameter:
childNodes
- the new child nodes
-
addChild
Adds a child to the list of child nodes- Parameter:
child
- the node of the child
-
getParentNode
Returns the parent node- Gibt zurück:
- the parent node
-
getChildNodes
Returns the child nodes- Gibt zurück:
- the child nodes
-
getChild
-
setContent
Sets the content of the node- Parameter:
content
- the content
-
getContent
T getContent()Returns the content of the node- Gibt zurück:
- the content of the node
-
containsContent
Checks whether the node contains a given string as content "out"-Method- Parameter:
compare
- the String that will be checked as referencenode
-- Gibt zurück:
- true if the String equals the content, false if not
-
isSubClassOf
Checks whether the given node is sublcass of a specified node- Parameter:
parent
- the other node the given instance might be subclass ofdirect
- if true is passed, this method only returns true if the current instance is a direct sublass of the parent class- Gibt zurück:
- true if it is a subclass of the specified parent, false if not
-
isSubClassOf
Checks whether the given node is sublcass of a specified node default value of direct is false- Parameter:
parent
- the other node the given instance might be subclass of- Gibt zurück:
- true if it is a subclass of the specified parent, false if not
-
getRoot
Returns the root node of the current tree node- Gibt zurück:
- the root node
-
getHeigthToLastLeaf
int getHeigthToLastLeaf()Returns the height of the longest path to a leaf starting from this node. If this node is already a leaf, it returns 0- Gibt zurück:
-