|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.GraphBuilder<N,E,G>
N - the type of nodes contained in the graphE - the type of edges contained in the graphG - the type of the graphpublic final class GraphBuilder<N,E,G extends Graph<N,E>>
Helper class for building graphs.
Graph| Method Summary | ||
|---|---|---|
GraphBuilder<N,E,G> |
addEdge(E edge)
Adds the specified edge to the graph if it is not already present. |
|
GraphBuilder<N,E,G> |
addEdge(N source,
N target)
Adds an edge from the specified source to the specified target node to the graph if it is not already present. |
|
GraphBuilder<N,E,G> |
addGraph(G graph)
Adds all nodes and edges contained in the specified graph if they are not already present. |
|
GraphBuilder<N,E,G> |
addNode(N node)
Adds the specified node to the graph if it is not already present. |
|
G |
build()
Builds the graph. |
|
static
|
create(G graph)
Creates a new graph builder for the given graph. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <N,E,G extends Graph<N,E>> GraphBuilder<N,E,G> create(G graph)
N - the type of nodes contained in the graphE - the type of edges contained in the graphG - the type of the graphgraph - the graph to create a builder for
public GraphBuilder<N,E,G> addNode(N node)
node - node to be added to the graph
public GraphBuilder<N,E,G> addEdge(E edge)
edge - edge to be added to the graph
public GraphBuilder<N,E,G> addEdge(N source,
N target)
source - the source node of the edge that is to be createdtarget - the target node of the edge that is to be created
public GraphBuilder<N,E,G> addGraph(G graph)
graph - the graph to add
public G build()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||