V - Vertex typeE - Edge typepublic interface DirectedGraph<V,E>
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DirectedGraph.EdgeFactory<V,E>
Factory for edges.
|
| Modifier and Type | Method and Description |
|---|---|
E |
addEdge(V vertex,
V targetVertex)
Adds an edge to this graph.
|
boolean |
addVertex(V vertex)
Adds a vertex to this graph.
|
Set<E> |
edgeSet() |
E |
getEdge(V source,
V target) |
List<E> |
getInwardEdges(V vertex) |
List<E> |
getOutwardEdges(V source) |
void |
removeAllVertices(Collection<V> collection) |
boolean |
removeEdge(V vertex,
V targetVertex) |
Set<V> |
vertexSet() |
boolean addVertex(V vertex)
vertex - VertexE addEdge(V vertex, V targetVertex)
vertex - Source vertextargetVertex - Target vertexIllegalArgumentException - if either vertex is not already in graphvoid removeAllVertices(Collection<V> collection)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.