|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectprefuse.data.tree.AbstractDeclarativeTree<N,E>
N - E - public abstract class AbstractDeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>
This is a base implementation for a declarative tree. Subclasses should override some of the more inefficient operations where possible.
| Constructor Summary | |
|---|---|
AbstractDeclarativeTree()
|
|
AbstractDeclarativeTree(N root)
|
|
| Method Summary | |
|---|---|
int |
getDepth(N n)
Get the depth of the given node in the tree. |
N |
getNextSibling(N node)
Get the next sibling of the given node. |
int |
getNodeCount()
Get the number of nodes in this graph. |
protected int |
getNodeCountFrom(N n)
|
N |
getPreviousSibling(N node)
Get the previous sibling of the given node. |
N |
getRoot()
Get the root node. |
protected void |
setRoot(N root)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface prefuse.data.tree.DeclarativeTree |
|---|
childEdges, children, getParent, getParentEdge |
| Constructor Detail |
|---|
public AbstractDeclarativeTree()
public AbstractDeclarativeTree(N root)
| Method Detail |
|---|
public int getNodeCount()
DeclarativeTree
getNodeCount in interface DeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>protected int getNodeCountFrom(N n)
public N getRoot()
DeclarativeTree
getRoot in interface DeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>protected void setRoot(N root)
public N getNextSibling(N node)
DeclarativeTree
getNextSibling in interface DeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>node - a node
public N getPreviousSibling(N node)
DeclarativeTree
getPreviousSibling in interface DeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>node - a node
public int getDepth(N n)
getDepth in interface DeclarativeTree<N extends Node<N,E>,E extends Edge<N,E>>n - a node in the tree
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||