Class ReducedNodeEdgeConnectorItem.Builder
java.lang.Object
com.dna.jopt.member.unit.nodeedge.reduced.ReducedNodeEdgeConnectorItem.Builder
- All Implemented Interfaces:
ReducedNodeEdgeConnectorItem.BuildFinal
,ReducedNodeEdgeConnectorItem.DistanceBuildStage
,ReducedNodeEdgeConnectorItem.FromElementIdBuildStage
,ReducedNodeEdgeConnectorItem.TimeBuildStage
,ReducedNodeEdgeConnectorItem.ToElementIdBuildStage
- Enclosing class:
- ReducedNodeEdgeConnectorItem
@NotThreadSafe
public static final class ReducedNodeEdgeConnectorItem.Builder
extends Object
implements ReducedNodeEdgeConnectorItem.DistanceBuildStage, ReducedNodeEdgeConnectorItem.TimeBuildStage, ReducedNodeEdgeConnectorItem.FromElementIdBuildStage, ReducedNodeEdgeConnectorItem.ToElementIdBuildStage, ReducedNodeEdgeConnectorItem.BuildFinal
Builds instances of type
ReducedNodeEdgeConnectorItem
.
Initialize attributes and then invoke the build()
method to create an
immutable instance.
Builder
is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newReducedNodeEdgeConnectorItem
.distance
(javax.measure.Quantity<javax.measure.quantity.Length> distance) Initializes the value for thedistance
attribute.fromElementId
(String fromElementId) Initializes the value for thefromElementId
attribute.Initializes the value for thetime
attribute.toElementId
(String toElementId) Initializes the value for thetoElementId
attribute.
-
Method Details
-
distance
@CanIgnoreReturnValue public final ReducedNodeEdgeConnectorItem.Builder distance(javax.measure.Quantity<javax.measure.quantity.Length> distance) Initializes the value for thedistance
attribute.- Specified by:
distance
in interfaceReducedNodeEdgeConnectorItem.DistanceBuildStage
- Parameters:
distance
- The value for distance- Returns:
this
builder for use in a chained invocation
-
time
Initializes the value for thetime
attribute.- Specified by:
time
in interfaceReducedNodeEdgeConnectorItem.TimeBuildStage
- Parameters:
time
- The value for time- Returns:
this
builder for use in a chained invocation
-
fromElementId
@CanIgnoreReturnValue public final ReducedNodeEdgeConnectorItem.Builder fromElementId(String fromElementId) Initializes the value for thefromElementId
attribute.- Specified by:
fromElementId
in interfaceReducedNodeEdgeConnectorItem.FromElementIdBuildStage
- Parameters:
fromElementId
- The value for fromElementId- Returns:
this
builder for use in a chained invocation
-
toElementId
@CanIgnoreReturnValue public final ReducedNodeEdgeConnectorItem.Builder toElementId(String toElementId) Initializes the value for thetoElementId
attribute.- Specified by:
toElementId
in interfaceReducedNodeEdgeConnectorItem.ToElementIdBuildStage
- Parameters:
toElementId
- The value for toElementId- Returns:
this
builder for use in a chained invocation
-
build
Builds a newReducedNodeEdgeConnectorItem
.- Specified by:
build
in interfaceReducedNodeEdgeConnectorItem.BuildFinal
- Returns:
- An immutable instance of ReducedNodeEdgeConnectorItem
- Throws:
IllegalStateException
- if any required attributes are missing
-