Protege 3.3.1

edu.stanford.smi.protege.util
Class Tree<X>

java.lang.Object
  extended by edu.stanford.smi.protege.util.Tree<X>
All Implemented Interfaces:
Cloneable

public class Tree<X>
extends Object
implements Cloneable

A utility class that maintains a tree. Why isn't something like this in java.util?

Author:
Ray Fergerson

Constructor Summary
Tree()
           
Tree(X root)
           
 
Method Summary
 void addChild(X parent, X child)
           
 Object clone()
           
 Set<X> getChildren(X parent)
           
 Set<X> getDescendents(X parent)
           
 Set<X> getNodeAndDescendents(X parent)
           
 Set<X> getNodes()
           
 X getRoot()
           
 boolean isReachable(X node)
           
 void removeChild(X parent, X child)
           
 void removeNode(X node)
           
 void setRoot(X root)
           
 void swapNode(X oldNode, X newNode)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tree

public Tree(X root)

Tree

public Tree()
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

setRoot

public void setRoot(X root)

swapNode

public void swapNode(X oldNode,
                     X newNode)

getRoot

public X getRoot()

isReachable

public boolean isReachable(X node)

addChild

public void addChild(X parent,
                     X child)

removeChild

public void removeChild(X parent,
                        X child)

removeNode

public void removeNode(X node)

getChildren

public Set<X> getChildren(X parent)

getNodeAndDescendents

public Set<X> getNodeAndDescendents(X parent)

getDescendents

public Set<X> getDescendents(X parent)

getNodes

public Set<X> getNodes()

Protege 3.3.1

Submit a bug report or feature request
Protégé is a trademark of Stanford University.
Copyright (c) 1998-2007 Stanford University.