Package com.jalios.util
Class MockTreeNode
- java.lang.Object
 - 
- com.jalios.util.MockTreeNode
 
 
- 
- 
Constructor Summary
Constructors Constructor Description MockTreeNode(java.lang.String str)MockTreeNode(java.lang.String str, TreeNode... child) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(MockTreeNode node)intcompareTo(java.lang.Object o)booleanequals(java.lang.Object o)java.lang.StringgetId()Returns id of the current nodejava.lang.StringgetName()java.util.Collection<TreeNode>getTreeChildren()Returns a Collection of TreeNode children of the current nodeTreeNodegetTreeParent()Returns parent of the current nodeTreeNodegetTreeRoot()Returns the root of the current nodebooleanisTreeLeaf()Returns boolean true if the TreeNode is a leafbooleanisTreeNode()Returns boolean true if the TreeNode is a nodejava.lang.StringtoString() 
 - 
 
- 
- 
Field Detail
- 
parent
public TreeNode parent
 
- 
str
public java.lang.String str
 
 - 
 
- 
Constructor Detail
- 
MockTreeNode
public MockTreeNode(java.lang.String str)
 
- 
MockTreeNode
public MockTreeNode(java.lang.String str, TreeNode... child) 
 - 
 
- 
Method Detail
- 
addChild
public void addChild(MockTreeNode node)
 
- 
getName
public java.lang.String getName()
 
- 
getId
public java.lang.String getId()
Description copied from interface:TreeNodeReturns id of the current node 
- 
getTreeChildren
public java.util.Collection<TreeNode> getTreeChildren()
Description copied from interface:TreeNodeReturns a Collection of TreeNode children of the current node- Specified by:
 getTreeChildrenin interfaceTreeNode- Returns:
 - Collection of TreeNode
 
 
- 
getTreeParent
public 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
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
- 
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
 compareToin interfacejava.lang.Comparable
 
- 
equals
public boolean equals(java.lang.Object o)
- Overrides:
 equalsin classjava.lang.Object
 
- 
getTreeRoot
public TreeNode getTreeRoot()
Description copied from interface:TreeNodeReturns the root of the current node- Specified by:
 getTreeRootin interfaceTreeNode- Returns:
 - TreeNode root Node
 
 
 - 
 
 -