public class DAGNodeBuilder<V,E> extends Object
DAGNode.newBuilder()
or DAGNode.newBuilder(Object)
.Constructor and Description |
---|
DAGNodeBuilder() |
DAGNodeBuilder(V lbl) |
Modifier and Type | Method and Description |
---|---|
DAGNodeBuilder<V,E> |
addEdge(DAGNode<V,E> target,
E label)
Add an edge.
|
DAGNodeBuilder<V,E> |
addEdge(org.apache.commons.lang3.tuple.Pair<DAGNode<V,E>,E> edge)
Add an edge.
|
DAGNode<V,E> |
build() |
Set<org.apache.commons.lang3.tuple.Pair<DAGNode<V,E>,E>> |
getEdges()
Get the set of edges.
|
V |
getLabel()
Get the label set for this node.
|
DAGNodeBuilder<V,E> |
setLabel(V lbl)
Set the node's label.
|
String |
toString() |
public DAGNodeBuilder()
public DAGNodeBuilder(V lbl)
@Nonnull public DAGNodeBuilder<V,E> setLabel(@Nonnull V lbl)
lbl
- The node's label.public V getLabel()
@Nonnull public DAGNodeBuilder<V,E> addEdge(@Nonnull DAGNode<V,E> target, @Nonnull E label)
target
- The target node.label
- The edge label.@Nonnull public DAGNodeBuilder<V,E> addEdge(org.apache.commons.lang3.tuple.Pair<DAGNode<V,E>,E> edge)
edge
- The target node and label for the edge.@Nonnull public Set<org.apache.commons.lang3.tuple.Pair<DAGNode<V,E>,E>> getEdges()
Copyright © 2016 GroupLens Research. All rights reserved.