org.sonar.graph
Class DirectedGraph<V,E extends Edge<V>>
java.lang.Object
org.sonar.graph.DirectedGraph<V,E>
- All Implemented Interfaces:
- DirectedGraphAccessor<V,E>
public class DirectedGraph<V,E extends Edge<V>>
- extends Object
- implements DirectedGraphAccessor<V,E>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectedGraph
public DirectedGraph()
DirectedGraph
public DirectedGraph(EdgeFactory<V,E> edgeFactory)
createStringDirectedGraph
public static DirectedGraph<String,StringEdge> createStringDirectedGraph()
addEdge
public DirectedGraph<V,E> addEdge(V from,
V to)
addEdge
public DirectedGraph<V,E> addEdge(V from,
V to,
int weight)
addEdge
public DirectedGraph<V,E> addEdge(E edge)
getEdge
public E getEdge(V from,
V to)
- Specified by:
getEdge
in interface DirectedGraphAccessor<V,E extends Edge<V>>
hasEdge
public boolean hasEdge(V from,
V to)
- Specified by:
hasEdge
in interface DirectedGraphAccessor<V,E extends Edge<V>>
addVertex
public void addVertex(V vertex)
addVertices
public void addVertices(Collection<V> vertices)
getVertices
public Set<V> getVertices()
- Specified by:
getVertices
in interface DirectedGraphAccessor<V,E extends Edge<V>>
getEdges
public List<E> getEdges(Collection<V> vertices)
getOutgoingEdges
public Collection<E> getOutgoingEdges(V from)
- Specified by:
getOutgoingEdges
in interface DirectedGraphAccessor<V,E extends Edge<V>>
getIncomingEdges
public Collection<E> getIncomingEdges(V to)
- Specified by:
getIncomingEdges
in interface DirectedGraphAccessor<V,E extends Edge<V>>
Copyright © 2009-2012 SonarSource. All Rights Reserved.