Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      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)`
`Tree<X>` | `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 Tree<X> 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()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Protege 3.5 alpha
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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