public static class Edge.Builder
extends java.lang.Object
Edge.Builder
can be used to construct an Edge
little by
little.Constructor and Description |
---|
Builder(Node source,
Node target)
Constructs a new
Edge.Builder for an Edge which connects
the given source Node with the given target
Node . |
Modifier and Type | Method and Description |
---|---|
Edge.Builder |
attr(java.lang.String key,
java.lang.Object value)
Puts the given key-value-pair into the
attributes map of the Edge which is
constructed by this Edge.Builder . |
Edge |
build()
Constructs a new
Edge from the values which have been
supplied to this Edge.Builder . |
public Builder(Node source, Node target)
Edge.Builder
for an Edge
which connects
the given source Node
with the given target
Node
.source
- The source Node
for the Edge
which is
constructed by this Edge.Builder
.target
- The target Node
for the Edge
which is
constructed by this Edge.Builder
.public Edge.Builder attr(java.lang.String key, java.lang.Object value)
attributes map
of the Edge
which is
constructed by this Edge.Builder
.key
- The attribute name which is inserted.value
- The attribute value which is inserted.this
for convenience.public Edge build()
Edge
from the values which have been
supplied to this Edge.Builder
.Edge
from the values which have been supplied
to this Edge.Builder
.Copyright (c) 2014 itemis AG and others. All rights reserved.