org.xistrat.util.d3.vrmlgraph
Class GraphData

java.lang.Object
  extended by org.xistrat.util.d3.vrmlgraph.GraphData

public class GraphData
extends java.lang.Object

The class used to store 3-D graph data.

Since:
0.6.90

Constructor Summary
GraphData()
          Constructor for the GraphData object
 
Method Summary
 void addEdge(Edge e)
          Adds an Edge to the graph data.
 void addNode(Node n)
          Adds a Node to the graph data.
 void clear()
          Clears the entire contents of the graph, including all Nodes and all Edges that may have existed in it.
 int countNodes()
          Count the number of Nodes stored in the GraphData object.
 java.util.Iterator<Edge> getEdgeIterator()
          Returns an Iterator of all Edges stored within this class.
 java.util.Iterator<Node> getNodeIterator()
          Returns an Iterator of all Nodes stored within this class.
 java.util.Iterator<Node> getNodeIterator(int index)
          Returns an Iterator of all Nodes stored within this class, starting from the Node at index index
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphData

public GraphData()
Constructor for the GraphData object

Method Detail

getNodeIterator

public java.util.Iterator<Node> getNodeIterator()
Returns an Iterator of all Nodes stored within this class.

Returns:
An Iterator of all Nodes stored within this class.

getNodeIterator

public java.util.Iterator<Node> getNodeIterator(int index)
Returns an Iterator of all Nodes stored within this class, starting from the Node at index index

Parameters:
index - The index of the LinkedList to start iterating from.
Returns:
An Iterator of all Nodes starting from index index

getEdgeIterator

public java.util.Iterator<Edge> getEdgeIterator()
Returns an Iterator of all Edges stored within this class.

Returns:
An Iterator of all Edges stored within this class.

addNode

public void addNode(Node n)
Adds a Node to the graph data.

Parameters:
n - The Node to be added to the graph.

addEdge

public void addEdge(Edge e)
Adds an Edge to the graph data.

Parameters:
e - The edge to be added to the graph.

countNodes

public int countNodes()
Count the number of Nodes stored in the GraphData object.

Returns:
The number of Nodes stored in the GraphData object.

clear

public void clear()
Clears the entire contents of the graph, including all Nodes and all Edges that may have existed in it.