|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcommon.AbstractDGraph
common.ParentUpdateDGraph
public class ParentUpdateDGraph
Directed graph that is backed by an underlying DGraph, but represents changes to the set of nodes and to the parent sets of some existing nodes (and thus to the child sets of some nodes as well).
Field Summary |
---|
Fields inherited from interface common.DGraph |
---|
EMPTY_GRAPH |
Constructor Summary | |
---|---|
ParentUpdateDGraph(DGraph underlying)
Creates a new ParentUpdateDGraph that represents no changes to the given underlying graph. |
Method Summary | |
---|---|
void |
addEdge(java.lang.Object parent,
java.lang.Object child)
Throws an UnsupportedOperationException. |
boolean |
addNode(java.lang.Object v)
Adds the given node to the graph with an empty parent set. |
void |
changeUnderlying()
Changes the underlying graph so it is equal to this graph. |
void |
clearChanges()
|
java.lang.Object |
clone()
|
java.util.Set |
getChildren(java.lang.Object v)
Returns an unmodifiable set consisting of the given object's children, or null if the object is not in the graph. |
java.util.Set |
getNewlyBarrenNodes()
Returns the set of nodes that are barren in this graph but are not barren nodes in the underlying graph. |
java.util.Set |
getParents(java.lang.Object v)
Returns an unmodifiable set consisting of the given object's parents, or null if the object is not in the graph. |
java.util.Set |
nodes()
Returns an unmodifiable set consisting of the nodes in this graph. |
void |
removeEdge(java.lang.Object parent,
java.lang.Object child)
Throws an UnsupportedOperationException. |
boolean |
removeNode(java.lang.Object v)
Removes the given node from the graph, along with all incident edges. |
void |
setParents(java.lang.Object v,
java.util.Set newParents)
Changes the parent set of the given node to equal the given set. |
Methods inherited from class common.AbstractDGraph |
---|
getAncestors, getDescendants, getRoots, print |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParentUpdateDGraph(DGraph underlying)
Method Detail |
---|
public java.util.Set nodes()
DGraph
nodes
in interface DGraph
public boolean addNode(java.lang.Object v)
addNode
in interface DGraph
addNode
in class AbstractDGraph
public boolean removeNode(java.lang.Object v)
removeNode
in interface DGraph
removeNode
in class AbstractDGraph
public void addEdge(java.lang.Object parent, java.lang.Object child)
AbstractDGraph
addEdge
in interface DGraph
addEdge
in class AbstractDGraph
public void removeEdge(java.lang.Object parent, java.lang.Object child)
AbstractDGraph
removeEdge
in interface DGraph
removeEdge
in class AbstractDGraph
public java.util.Set getParents(java.lang.Object v)
DGraph
getParents
in interface DGraph
public void setParents(java.lang.Object v, java.util.Set newParents)
setParents
in interface DGraph
setParents
in class AbstractDGraph
public java.util.Set getChildren(java.lang.Object v)
DGraph
getChildren
in interface DGraph
public java.util.Set getNewlyBarrenNodes()
public void changeUnderlying()
public void clearChanges()
public java.lang.Object clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |