|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectpedviz.graph.Hierarchy
public class Hierarchy
This class represents the hierarchy of a graph. Every graph has one or more hierarchies.
| Constructor Summary | |
|---|---|
Hierarchy(Graph graph)
Creates a hierarchy for the given graph. |
|
| Method Summary | |
|---|---|
void |
addNode(int level,
Node node)
Adds the given node at the given level to the hierarchy. |
int |
getLevelSize()
Returns the number of different levels. |
java.util.HashMap<java.lang.Integer,java.util.ArrayList<Node>> |
getNodes()
|
java.util.ArrayList<Node> |
getNodes(int level)
Returns a collection of all nodes from the given level. |
void |
removeNode(Node node)
Removes the given node from the hierarchy. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Hierarchy(Graph graph)
graph - | Method Detail |
|---|
public void addNode(int level,
Node node)
level - levelnode - nodepublic void removeNode(Node node)
node - nodepublic java.util.ArrayList<Node> getNodes(int level)
level - level
public int getLevelSize()
public java.util.HashMap<java.lang.Integer,java.util.ArrayList<Node>> getNodes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||