T
- the type of the data to store in Vertices of this graphpublic interface Graph<T>
extends java.io.Serializable
Modifier and Type | Method and Description |
---|---|
Vertex<T> |
addVertex(T data)
Adds a new vertex to the graph with the given data
|
java.util.Set<? extends Edge<T>> |
getEdges()
Gets all the edges in the graph
|
java.util.Set<? extends Vertex<T>> |
getVertices()
Gets all the vertices in the graph
|
void |
removeAllEdges()
Deletes all the edges in the graph
|
void |
removeAllVertices()
Deletes all the vertices in the graph
|
Vertex<T> addVertex(T data)
data
- the data to add to the graphjava.util.Set<? extends Edge<T>> getEdges()
java.util.Set<? extends Vertex<T>> getVertices()
void removeAllEdges()
void removeAllVertices()