edu.ucla.stat.SOCR.touchgraph.graphlayout.graphelements
Interface ImmutableGraphEltSet

All Known Implementing Classes:
GraphEltSet, Locality, VisibleLocality

public interface ImmutableGraphEltSet

ImmutableGraphEltSet provides access to the elements of GraphElementSet that does not allow for addition or deletion of nodes or edges.

Version:
1.22-jre1.1 $Id: ImmutableGraphEltSet.java,v 1.1 2010/01/20 20:38:32 jiecui Exp $
Author:
Alexander Shapiro

Method Summary
 int edgeCount()
          Return the number of Edges in the cumulative Vector.
 int edgeNum()
          Deprecated. this method has been replaced by the edgeCount() method.
 Edge findEdge(Node from, Node to)
          Return an Edge spanning Node from to Node to.
 Node findNode(java.lang.String id)
          Return the Node whose ID matches the String id, null if no match is found.
 Node findNodeLabelContaining(java.lang.String substring)
          Return the first Nodes whose label contains the String substring, null if no match is found.
 void forAllEdges(TGForEachEdge fee)
          iterates through Edges.
 void forAllNodePairs(TGForEachNodePair fenp)
          iterates through pairs of Nodes.
 void forAllNodes(TGForEachNode fen)
          iterates through all the nodes.
 Node getFirstNode()
          Return the first Node, null if none exist.
 Node getRandomNode()
          Returns a random node, or null if none exist (for making random graphs).
 int nodeCount()
          Return the number of Nodes in the cumulative Vector.
 int nodeNum()
          Deprecated. this method has been replaced by the nodeCount() method.
 

Method Detail

nodeCount

int nodeCount()
Return the number of Nodes in the cumulative Vector.


nodeNum

int nodeNum()
Deprecated. this method has been replaced by the nodeCount() method.

Return the current Node count.


edgeCount

int edgeCount()
Return the number of Edges in the cumulative Vector.


edgeNum

int edgeNum()
Deprecated. this method has been replaced by the edgeCount() method.

Return the current Edge count.


findNode

Node findNode(java.lang.String id)
Return the Node whose ID matches the String id, null if no match is found.


findNodeLabelContaining

Node findNodeLabelContaining(java.lang.String substring)
Return the first Nodes whose label contains the String substring, null if no match is found.


findEdge

Edge findEdge(Node from,
              Node to)
Return an Edge spanning Node from to Node to.


getRandomNode

Node getRandomNode()
Returns a random node, or null if none exist (for making random graphs).


getFirstNode

Node getFirstNode()
Return the first Node, null if none exist.


forAllNodes

void forAllNodes(TGForEachNode fen)
iterates through all the nodes.


forAllNodePairs

void forAllNodePairs(TGForEachNodePair fenp)
iterates through pairs of Nodes.


forAllEdges

void forAllEdges(TGForEachEdge fee)
iterates through Edges.