|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
N
- E
- public interface DeclarativeTree<N extends Node<?,?>,E extends Edge<?,?>>
This is intended to be a lightweight means of defining a Tree across an existing Graph.
Implementors can define arbitrary tree structures within their Graphs. SpanningTree implements this interface, and other interfaces can easily be defined.
This interface could be used in user-defined layouts.
SpanningTree
,
NodeBasedDeclarativeTree
,
DeclarativeTreeLayout
Method Summary | |
---|---|
java.util.List<E> |
childEdges(N n)
Get all the edges connecting a child to the parent node. |
java.util.List<N> |
children(N parent)
Get all the children of the parent node. |
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. |
N |
getParent(N child)
Get a node's parent node |
E |
getParentEdge(N child)
Get the edge to the given node's parent. |
N |
getPreviousSibling(N node)
Get the previous sibling of the given node. |
N |
getRoot()
Get the root node. |
Method Detail |
---|
N getRoot()
java.util.List<N> children(N parent)
n
- the parent node
java.util.List<E> childEdges(N n)
n
- the parent node
int getDepth(N n)
n
- a node in the tree
N getParent(N child)
n
- the child node
E getParentEdge(N child)
n
- a Node instance
N getPreviousSibling(N node)
node
- a node
N getNextSibling(N node)
node
- a node
int getNodeCount()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |