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.
|
java.util.Set<E> |
edgeSet() |
E |
getEdge(V source,
V target) |
java.util.List<E> |
getInwardEdges(V vertex) |
java.util.List<E> |
getOutwardEdges(V source) |
void |
removeAllVertices(java.util.Collection<V> collection) |
boolean |
removeEdge(V vertex,
V targetVertex) |
java.util.Set<V> |
vertexSet() |
boolean addVertex(V vertex)
vertex
- VertexE addEdge(V vertex, V targetVertex)
vertex
- Source vertextargetVertex
- Target vertexjava.lang.IllegalArgumentException
- if either vertex is not already in graphjava.util.Set<V> vertexSet()
void removeAllVertices(java.util.Collection<V> collection)
java.util.Set<E> edgeSet()
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.