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 Summary
All 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
-
getChildren
public java.util.Collection<TreeNode<ValueType>> getChildren()
Get a list of all the children of this node- Returns:
- A List of child nodes.
-
addChild
public void addChild(TreeNode<ValueType> node)
Add a child to the children list- Parameters:
node- The child to add
-
getValue
public ValueType getValue()
Get the value stored by this node- Returns:
- the value stored by this node
-
setValue
public void setValue(ValueType value)
Set the value for this node- Parameters:
value- the value for this node
-
setParent
public void setParent(TreeNode<ValueType> parent)
Set the parent node- Parameters:
parent- the parent node
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
-
setProperties
public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
-
addProperty
public void addProperty(java.lang.String key, java.lang.Object value)Add a property to the tree node- Parameters:
key- key for the propertyvalue- value of the property
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-