Package oms3.ds
Class Tree
- java.lang.Object
-
- oms3.ds.Tree
-
public class Tree extends Object
Tree data structure.- Version:
- $Id$
- Author:
- Olaf David (olaf.david@ars.usda.gov)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Compound parent, Compound child)List<Compound>children(Compound c)Collection<Compound>content()CompoundgetRoot()Compoundparent(Compound c)Iterator<Compound>toRootOrder(Compound c)Returns all compounds from the Compound argument to the root of the tree following the path.
-
-
-
Constructor Detail
-
Tree
public Tree(Compound root)
-
-
Method Detail
-
toRootOrder
public Iterator<Compound> toRootOrder(Compound c)
Returns all compounds from the Compound argument to the root of the tree following the path.- Parameters:
c- the Compound to start with.- Returns:
- the set of Compounds in the given order.
-
getRoot
public Compound getRoot()
-
content
public Collection<Compound> content()
-
-