|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcommon.AbstractDGraph
public abstract class AbstractDGraph
Abstract implementation of the DGraph interface.
Field Summary |
---|
Fields inherited from interface common.DGraph |
---|
EMPTY_GRAPH |
Constructor Summary | |
---|---|
AbstractDGraph()
|
Method Summary | |
---|---|
void |
addEdge(java.lang.Object parent,
java.lang.Object child)
Throws an UnsupportedOperationException. |
boolean |
addNode(java.lang.Object v)
Throws an UnsupportedOperationException. |
java.util.Set |
getAncestors(java.lang.Object v)
Returns the set of ancestors of the given node, including the node itself. |
java.util.Set |
getDescendants(java.lang.Object v)
Returns the set of descendants of the given node, including the node itself. |
java.util.Set |
getRoots()
Returns the set of nodes in this graph that have no parents. |
void |
print(java.io.PrintStream s)
Prints a description of this graph to the given stream. |
void |
removeEdge(java.lang.Object parent,
java.lang.Object child)
Throws an UnsupportedOperationException. |
boolean |
removeNode(java.lang.Object v)
Throws an UnsupportedOperationException. |
void |
setParents(java.lang.Object v,
java.util.Set newParents)
Implements setParents in terms of addEdge and removeEdge. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface common.DGraph |
---|
getChildren, getParents, nodes |
Constructor Detail |
---|
public AbstractDGraph()
Method Detail |
---|
public boolean addNode(java.lang.Object v)
addNode
in interface DGraph
public boolean removeNode(java.lang.Object v)
removeNode
in interface DGraph
public void addEdge(java.lang.Object parent, java.lang.Object child)
addEdge
in interface DGraph
public void removeEdge(java.lang.Object parent, java.lang.Object child)
removeEdge
in interface DGraph
public void setParents(java.lang.Object v, java.util.Set newParents)
setParents
in interface DGraph
public java.util.Set getRoots()
DGraph
getRoots
in interface DGraph
public java.util.Set getAncestors(java.lang.Object v)
DGraph
getAncestors
in interface DGraph
public java.util.Set getDescendants(java.lang.Object v)
DGraph
getDescendants
in interface DGraph
public void print(java.io.PrintStream s)
DGraph
print
in interface DGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |