public abstract class GraphFactory<V extends Vertex,E extends Edge>
extends java.lang.Object
DefaultGraphFactory
Constructor and Description |
---|
GraphFactory() |
Modifier and Type | Method and Description |
---|---|
abstract E |
createEdge(V predecessor,
V successor)
Creates a new edge with a weight of zero.
|
abstract E |
createEdge(V predecessor,
V successor,
boolean directed)
Creates a new edge.
|
abstract E |
createEdge(V predecessor,
V successor,
boolean directed,
float weight)
Creates a new edge.
|
abstract E |
createEdge(V predecessor,
V successor,
float weight)
Creates a new edge.
|
abstract V |
createVertex(java.lang.String caption)
Creates a new vertex.
|
public abstract V createVertex(java.lang.String caption) throws java.lang.IllegalArgumentException
null
. Otherwise
no vertices can be created!caption
- the default caption (that is an unique index value for the current graph)java.lang.IllegalArgumentException
- public abstract E createEdge(V predecessor, V successor) throws java.lang.IllegalArgumentException
null
. Otherwise
no edges can be created!predecessor
- the predecessor of the edgesuccessor
- the successor of the edgejava.lang.IllegalArgumentException
- public abstract E createEdge(V predecessor, V successor, boolean directed) throws java.lang.IllegalArgumentException
null
. Otherwise
no edges can be created!predecessor
- the predecessor of the edgesuccessor
- the successor of the edgedirected
- flag that indicates whether the edge should be directed (true
) or undirected (false
) (has only an effect in mixed graphs otherwise the type of the edge is predefined)java.lang.IllegalArgumentException
- public abstract E createEdge(V predecessor, V successor, float weight) throws java.lang.IllegalArgumentException
null
. Otherwise
no edges can be created!predecessor
- the predecessor of the edgesuccessor
- the successor of the edgeweight
- the weight of the edgejava.lang.IllegalArgumentException
- public abstract E createEdge(V predecessor, V successor, boolean directed, float weight) throws java.lang.IllegalArgumentException
null
. Otherwise
no edges can be created!predecessor
- the predecessor of the edgesuccessor
- the successor of the edgeweight
- the weight of the edgedirected
- flag that indicates whether the edge should be directed (true
) or undirected (false
) (has only an effect in mixed graphs otherwise the type of the edge is predefined)java.lang.IllegalArgumentException
-