class CachedGraphBuilder extends java.lang.Object implements GraphBuilder
| Constructor and Description |
|---|
CachedGraphBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
buildEdge(java.lang.Object from,
java.lang.Object to,
double weight,
java.lang.Object value)
Build a new edge between the two objects, assocating it with a weight and an object.
|
Graph |
buildGraph()
Build the graph with all its nodes and edges which were built.
|
void |
buildNode(java.lang.Object key,
java.lang.Object value)
Build a node.
|
protected void |
clearEverything() |
void |
startNewGraph()
Tells the builder to start a new graph and therefore get rid of certain stored state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildEdge, buildEdge, buildNode, newBasicGraphBuilder, newCachedGraphBuilderpublic void startNewGraph()
GraphBuilderstartNewGraph in interface GraphBuilderpublic void buildNode(java.lang.Object key,
java.lang.Object value)
GraphBuilderNode.getValue(), and the key can be used to
build edges with.buildNode in interface GraphBuilderkey - The key to associate the new node with within this builder, for building edges.value - The value to use for the new node's value.public void buildEdge(java.lang.Object from,
java.lang.Object to,
double weight,
java.lang.Object value)
GraphBuilderGraphBuilder.buildEdge(Object, Object).buildEdge in interface GraphBuilderweight - The new weight of the edge.value - The value of the ddge, as in Edge.getValue().public Graph buildGraph()
GraphBuilderbuildGraph in interface GraphBuilderprotected void clearEverything()