Quadcap Embeddable Database

com.quadcap.util.collections.DiGraph Class Reference

List of all members.

Detailed Description

A simple implementation of a directed graph of Objects.

Each node is represented using HashSets of incoming and outgoing arcs.

Author:
Stan Bailes

Definition at line 66 of file DiGraph.java.

Public Member Functions

 DiGraph ()
void addNode (Object obj)
final Iterator getNodes ()
void addArc (Object from, Object to)
final boolean hasChildren (Object obj)
final boolean hasParents (Object obj)
boolean hasNode (Object obj)
final Iterator getParents (Object to)
final Iterator getChildren (Object from)
void removeNode (Object obj, boolean force)
void removeArc (Object from, Object to)
Iterator levelize ()
Iterator levelize (boolean cyclesOK)
String toString ()

Package Functions

final Node mapNode (Object obj)

Package Attributes

final HashMap nodes = new HashMap()


Constructor & Destructor Documentation

com.quadcap.util.collections.DiGraph.DiGraph  ) 
 

Definition at line 70 of file DiGraph.java.


Member Function Documentation

void com.quadcap.util.collections.DiGraph.addArc Object  from,
Object  to
 

Definition at line 80 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.addArc(), com.quadcap.util.collections.DiGraph.Node.addFrom(), com.quadcap.util.collections.DiGraph.Node.addTo(), and com.quadcap.util.collections.DiGraph.mapNode().

Referenced by com.quadcap.util.collections.DiGraph.addArc(), and com.quadcap.sql.tools.XmlDump.dumpViewDefinitions().

void com.quadcap.util.collections.DiGraph.addNode Object  obj  ) 
 

Definition at line 72 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.addNode(), and com.quadcap.util.collections.DiGraph.mapNode().

Referenced by com.quadcap.util.collections.DiGraph.addNode().

final Iterator com.quadcap.util.collections.DiGraph.getChildren Object  from  ) 
 

Definition at line 104 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.getChildren(), and com.quadcap.util.collections.DiGraph.mapNode().

Referenced by com.quadcap.util.collections.DiGraph.getChildren().

final Iterator com.quadcap.util.collections.DiGraph.getNodes  ) 
 

Definition at line 76 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.nodes.

Referenced by com.quadcap.util.collections.DiGraph.toString().

final Iterator com.quadcap.util.collections.DiGraph.getParents Object  to  ) 
 

Definition at line 100 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.getParents(), and com.quadcap.util.collections.DiGraph.mapNode().

Referenced by com.quadcap.util.collections.DiGraph.getParents().

final boolean com.quadcap.util.collections.DiGraph.hasChildren Object  obj  ) 
 

Definition at line 87 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.hasChildren(), com.quadcap.util.collections.DiGraph.mapNode(), and com.quadcap.util.collections.DiGraph.Node.toSize().

Referenced by com.quadcap.util.collections.DiGraph.hasChildren().

boolean com.quadcap.util.collections.DiGraph.hasNode Object  obj  ) 
 

Definition at line 95 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.hasNode(), and com.quadcap.util.collections.DiGraph.nodes.

Referenced by com.quadcap.util.collections.DiGraph.hasNode().

final boolean com.quadcap.util.collections.DiGraph.hasParents Object  obj  ) 
 

Definition at line 91 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.Node.fromSize(), com.quadcap.util.collections.DiGraph.hasParents(), and com.quadcap.util.collections.DiGraph.mapNode().

Referenced by com.quadcap.util.collections.DiGraph.hasParents().

Iterator com.quadcap.util.collections.DiGraph.levelize boolean  cyclesOK  ) 
 

Definition at line 142 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.Node.fromSize(), com.quadcap.util.collections.DiGraph.Node.iterateTo(), com.quadcap.util.collections.DiGraph.Node.level, com.quadcap.util.collections.DiGraph.nodes, and com.quadcap.util.collections.DiGraph.Node.visitCnt.

Iterator com.quadcap.util.collections.DiGraph.levelize  ) 
 

Definition at line 138 of file DiGraph.java.

Referenced by com.quadcap.sql.tools.XmlDump.dumpViewDefinitions().

final Node com.quadcap.util.collections.DiGraph.mapNode Object  obj  )  [package]
 

Definition at line 202 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.mapNode(), and com.quadcap.util.collections.DiGraph.nodes.

Referenced by com.quadcap.util.collections.DiGraph.addArc(), com.quadcap.util.collections.DiGraph.addNode(), com.quadcap.util.collections.DiGraph.getChildren(), com.quadcap.util.collections.DiGraph.getParents(), com.quadcap.util.collections.DiGraph.hasChildren(), com.quadcap.util.collections.DiGraph.hasParents(), com.quadcap.util.collections.DiGraph.mapNode(), com.quadcap.util.collections.DiGraph.removeArc(), and com.quadcap.util.collections.DiGraph.removeNode().

void com.quadcap.util.collections.DiGraph.removeArc Object  from,
Object  to
 

Definition at line 131 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.mapNode(), com.quadcap.util.collections.DiGraph.removeArc(), com.quadcap.util.collections.DiGraph.Node.removeFrom(), and com.quadcap.util.collections.DiGraph.Node.removeTo().

Referenced by com.quadcap.util.collections.DiGraph.removeArc().

void com.quadcap.util.collections.DiGraph.removeNode Object  obj,
boolean  force
 

Definition at line 108 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.Node.fromSize(), com.quadcap.util.collections.DiGraph.Node.iterateFrom(), com.quadcap.util.collections.DiGraph.Node.iterateTo(), com.quadcap.util.collections.DiGraph.mapNode(), com.quadcap.util.collections.DiGraph.nodes, com.quadcap.util.collections.DiGraph.Node.removeFrom(), com.quadcap.util.collections.DiGraph.removeNode(), com.quadcap.util.collections.DiGraph.Node.removeTo(), and com.quadcap.util.collections.DiGraph.Node.toSize().

Referenced by com.quadcap.util.collections.DiGraph.removeNode().

String com.quadcap.util.collections.DiGraph.toString  ) 
 

Definition at line 171 of file DiGraph.java.

References com.quadcap.util.collections.DiGraph.getNodes().


Member Data Documentation

final HashMap com.quadcap.util.collections.DiGraph.nodes = new HashMap() [package]
 

Definition at line 68 of file DiGraph.java.

Referenced by com.quadcap.util.collections.DiGraph.getNodes(), com.quadcap.util.collections.DiGraph.hasNode(), com.quadcap.util.collections.DiGraph.levelize(), com.quadcap.util.collections.DiGraph.mapNode(), and com.quadcap.util.collections.DiGraph.removeNode().