Class ReducedNodeEdgeConnectorItem
java.lang.Object
com.dna.jopt.member.unit.nodeedge.reduced.AbstractReducedNodeEdgeConnectorItem
com.dna.jopt.member.unit.nodeedge.reduced.ReducedNodeEdgeConnectorItem
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ReducedNodeEdgeConnectorItem
extends AbstractReducedNodeEdgeConnectorItem
Immutable implementation of
AbstractReducedNodeEdgeConnectorItem
.
Use the builder to create immutable instances:
ReducedNodeEdgeConnectorItem.builder()
.
Use the static factory method to create immutable instances:
ReducedNodeEdgeConnectorItem.of()
.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builds instances of typeReducedNodeEdgeConnectorItem
.static interface
static interface
static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forReducedNodeEdgeConnectorItem
.static ReducedNodeEdgeConnectorItem
copyOf
(AbstractReducedNodeEdgeConnectorItem instance) Creates an immutable copy of aAbstractReducedNodeEdgeConnectorItem
value.javax.measure.Quantity<javax.measure.quantity.Length>
distance()
boolean
This instance is equal to all instances ofReducedNodeEdgeConnectorItem
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:distance
,time
,fromElementId
,toElementId
.static ReducedNodeEdgeConnectorItem
of
(javax.measure.Quantity<javax.measure.quantity.Length> distance, Duration time, String fromElementId, String toElementId) Construct a new immutableReducedNodeEdgeConnectorItem
instance.time()
toString()
Prints the immutable valueReducedNodeEdgeConnectorItem
with attribute values.withDistance
(javax.measure.Quantity<javax.measure.quantity.Length> value) Copy the current immutable object by setting a value for thedistance
attribute.withFromElementId
(String value) Copy the current immutable object by setting a value for thefromElementId
attribute.Copy the current immutable object by setting a value for thetime
attribute.withToElementId
(String value) Copy the current immutable object by setting a value for thetoElementId
attribute.
-
Method Details
-
distance
public javax.measure.Quantity<javax.measure.quantity.Length> distance()- Specified by:
distance
in classAbstractReducedNodeEdgeConnectorItem
- Returns:
- The value of the
distance
attribute
-
time
- Specified by:
time
in classAbstractReducedNodeEdgeConnectorItem
- Returns:
- The value of the
time
attribute
-
fromElementId
- Specified by:
fromElementId
in classAbstractReducedNodeEdgeConnectorItem
- Returns:
- The value of the
fromElementId
attribute
-
toElementId
- Specified by:
toElementId
in classAbstractReducedNodeEdgeConnectorItem
- Returns:
- The value of the
toElementId
attribute
-
withDistance
public final ReducedNodeEdgeConnectorItem withDistance(javax.measure.Quantity<javax.measure.quantity.Length> value) Copy the current immutable object by setting a value for thedistance
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for distance- Returns:
- A modified copy of the
this
object
-
withTime
Copy the current immutable object by setting a value for thetime
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for time- Returns:
- A modified copy of the
this
object
-
withFromElementId
Copy the current immutable object by setting a value for thefromElementId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for fromElementId- Returns:
- A modified copy of the
this
object
-
withToElementId
Copy the current immutable object by setting a value for thetoElementId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for toElementId- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofReducedNodeEdgeConnectorItem
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:distance
,time
,fromElementId
,toElementId
. -
toString
Prints the immutable valueReducedNodeEdgeConnectorItem
with attribute values. -
of
public static ReducedNodeEdgeConnectorItem of(javax.measure.Quantity<javax.measure.quantity.Length> distance, Duration time, String fromElementId, String toElementId) Construct a new immutableReducedNodeEdgeConnectorItem
instance.- Parameters:
distance
- The value for thedistance
attributetime
- The value for thetime
attributefromElementId
- The value for thefromElementId
attributetoElementId
- The value for thetoElementId
attribute- Returns:
- An immutable ReducedNodeEdgeConnectorItem instance
-
copyOf
Creates an immutable copy of aAbstractReducedNodeEdgeConnectorItem
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable ReducedNodeEdgeConnectorItem instance
-
builder
Creates a builder forReducedNodeEdgeConnectorItem
.ReducedNodeEdgeConnectorItem.builder() .distance(javax.measure.Quantity<javax.measure.quantity.Length>) // required
distance
.time(java.time.Duration) // requiredtime
.fromElementId(String) // requiredfromElementId
.toElementId(String) // requiredtoElementId
.build();- Returns:
- A new ReducedNodeEdgeConnectorItem builder
-