coins.flow
Class TreeStructure

java.lang.Object
  extended bycoins.flow.TreeStructure

public class TreeStructure
extends java.lang.Object

A tree structure class.


Constructor Summary
TreeStructure()
          Constructs a new tree structure instance.
TreeStructure(java.util.Collection pCollection)
          Constructs a new tree structure instance whose nodes are elements of the specified argument Collection.
 
Method Summary
 java.util.List ancestorsOf(java.lang.Object pObj)
          Returns the ancestor nodes of the specified argument node, including the argument node itself, in this tree structure.
 java.util.List childrenOf(java.lang.Object pObj)
          Returns the child nodes of the specified argument node in this tree structure.
 boolean link(java.lang.Object pParent, java.lang.Object pChild)
          Makes a parent-child link between the given nodes.
 java.lang.Object parentOf(java.lang.Object pObj)
          Returns the parent node of the specified argument node in this tree structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeStructure

public TreeStructure(java.util.Collection pCollection)
Constructs a new tree structure instance whose nodes are elements of the specified argument Collection. +The nodes are not linked yet.


TreeStructure

public TreeStructure()
Constructs a new tree structure instance.

Method Detail

parentOf

public java.lang.Object parentOf(java.lang.Object pObj)
Returns the parent node of the specified argument node in this tree structure.


childrenOf

public java.util.List childrenOf(java.lang.Object pObj)
Returns the child nodes of the specified argument node in this tree structure.


ancestorsOf

public java.util.List ancestorsOf(java.lang.Object pObj)
Returns the ancestor nodes of the specified argument node, including the argument node itself, in this tree structure.


link

public boolean link(java.lang.Object pParent,
                    java.lang.Object pChild)
Makes a parent-child link between the given nodes.