| java.lang.Object org.eclipse.ui.internal.texteditor.rulers.DAG
DAG | final public class DAG (Code) | | A directed acyclic graph. See http://en.wikipedia.org/wiki/Directed_acyclic_graph
since: 3.3 |
addEdge | public boolean addEdge(Object origin, Object target)(Code) | | Adds a directed edge from origin to target . The vertices are not
required to exist prior to this call - if they are not currently contained by the graph, they are
automatically added.
Parameters: origin - the origin vertex of the dependency Parameters: target - the target vertex of the dependency true if the edge was added, false if theedge was not added because it would have violated the acyclic nature of thereceiver. |
addVertex | public void addVertex(Object vertex)(Code) | | Adds a vertex to the graph. If the vertex does not exist prior to this call, it is added with
no incoming or outgoing edges. Nothing happens if the vertex already exists.
Parameters: vertex - the new vertex |
getChildren | public Set getChildren(Object vertex)(Code) | | Returns the direct children of a vertex. The returned
Set is unmodifiable.
Parameters: vertex - the parent vertex the direct children of vertex |
getSinks | public Set getSinks()(Code) | | Returns the sinks of the receiver. A sink is a vertex with no outgoing edges. The returned
set's iterator traverses the nodes in the order they were added to the graph.
the sinks of the receiver |
getSources | public Set getSources()(Code) | | Returns the sources of the receiver. A source is a vertex with no incoming edges. The
returned set's iterator traverses the nodes in the order they were added to the graph.
the sources of the receiver |
removeVertex | public void removeVertex(Object vertex)(Code) | | Removes a vertex and all its edges from the graph.
Parameters: vertex - the vertex to remove |
|
|