public interface GraphFactory<T extends Vertex>
Modifier and Type | Method and Description |
---|---|
AbstractGraph<T> |
newGraph()
Creates a graph with the default initial capacity.
|
AbstractGraph<T> |
newGraph(java.util.Collection<T> vertices)
Creates a graph whose initial vertices are those contained in the given collection.
|
AbstractGraph<T> |
newGraph(int initialVertices)
Creates a graph with the specified initial capacity.
|
AbstractGraph<T> newGraph()
AbstractGraph<T> newGraph(int initialVertices)
initialVertices
- the initial vertex capacity of the graphAbstractGraph<T> newGraph(java.util.Collection<T> vertices)
vertices
- collection of vertices which are to belong to the given graph