Package com.jalios.util
Class MockTreeNode
java.lang.Object
com.jalios.util.MockTreeNode
- All Implemented Interfaces:
TreeNode,Comparable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(MockTreeNode node) intbooleangetId()Returns id of the current nodegetName()Returns a Collection of TreeNode children of the current nodeReturns parent of the current nodeReturns the root of the current nodebooleanReturns boolean true if the TreeNode is a leafbooleanReturns boolean true if the TreeNode is a nodetoString()
-
Field Details
-
parent
-
str
-
-
Constructor Details
-
MockTreeNode
-
MockTreeNode
-
-
Method Details
-
addChild
-
getName
-
getId
Description copied from interface:TreeNodeReturns id of the current node -
getTreeChildren
Description copied from interface:TreeNodeReturns a Collection of TreeNode children of the current node- Specified by:
getTreeChildrenin interfaceTreeNode- Returns:
- Collection of TreeNode
-
getTreeParent
Description copied from interface:TreeNodeReturns parent of the current node- Specified by:
getTreeParentin interfaceTreeNode- Returns:
- TreeNode parent Node
-
isTreeLeaf
public boolean isTreeLeaf()Description copied from interface:TreeNodeReturns boolean true if the TreeNode is a leaf- Specified by:
isTreeLeafin interfaceTreeNode- Returns:
- boolean indicating if node is leaf or node
-
isTreeNode
public boolean isTreeNode()Description copied from interface:TreeNodeReturns boolean true if the TreeNode is a node- Specified by:
isTreeNodein interfaceTreeNode- Returns:
- boolean indicating if node is leaf or node
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable
-
equals
-
getTreeRoot
Description copied from interface:TreeNodeReturns the root of the current node- Specified by:
getTreeRootin interfaceTreeNode- Returns:
- TreeNode root Node
-