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, wait
buildEdge, buildEdge, buildNode, newBasicGraphBuilder, newCachedGraphBuilder
public void startNewGraph()
GraphBuilder
startNewGraph
in interface GraphBuilder
public void buildNode(java.lang.Object key, java.lang.Object value)
GraphBuilder
Node.getValue()
, and the key can be used to
build edges with.buildNode
in interface GraphBuilder
key
- 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)
GraphBuilder
GraphBuilder.buildEdge(Object, Object)
.buildEdge
in interface GraphBuilder
weight
- The new weight of the edge.value
- The value of the ddge, as in Edge.getValue()
.public Graph buildGraph()
GraphBuilder
buildGraph
in interface GraphBuilder
protected void clearEverything()