Class TreeNode<ValueType>
- java.lang.Object
- 
- ca.corefacility.bioinformatics.irida.util.TreeNode<ValueType>
 
- 
- Type Parameters:
- ValueType- The value to be stored by this node
 
 public class TreeNode<ValueType> extends java.lang.ObjectSimple generic tree node with links to parent and a list of children
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(TreeNode<ValueType> node)Add a child to the children listvoidaddProperty(java.lang.String key, java.lang.Object value)Add a property to the tree nodebooleanequals(java.lang.Object obj)java.util.Collection<TreeNode<ValueType>>getChildren()Get a list of all the children of this nodeTreeNode<ValueType>getParent()Get the parent nodejava.util.Map<java.lang.String,java.lang.Object>getProperties()ValueTypegetValue()Get the value stored by this nodeinthashCode()voidsetParent(TreeNode<ValueType> parent)Set the parent nodevoidsetProperties(java.util.Map<java.lang.String,java.lang.Object> properties)voidsetValue(ValueType value)Set the value for this nodejava.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
getChildrenpublic java.util.Collection<TreeNode<ValueType>> getChildren() Get a list of all the children of this node- Returns:
- A List of child nodes.
 
 - 
addChildpublic void addChild(TreeNode<ValueType> node) Add a child to the children list- Parameters:
- node- The child to add
 
 - 
getValuepublic ValueType getValue() Get the value stored by this node- Returns:
- the value stored by this node
 
 - 
setValuepublic void setValue(ValueType value) Set the value for this node- Parameters:
- value- the value for this node
 
 - 
setParentpublic void setParent(TreeNode<ValueType> parent) Set the parent node- Parameters:
- parent- the parent node
 
 - 
getPropertiespublic java.util.Map<java.lang.String,java.lang.Object> getProperties() 
 - 
setPropertiespublic void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties) 
 - 
addPropertypublic void addProperty(java.lang.String key, java.lang.Object value)Add a property to the tree node- Parameters:
- key- key for the property
- value- value of the property
 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-