Class ZoneConnection
java.lang.Object
com.dna.jopt.member.unit.zonemanager.AbstractZoneConnection
com.dna.jopt.member.unit.zonemanager.ZoneConnection
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ZoneConnection
extends AbstractZoneConnection
Immutable implementation of
AbstractZoneConnection
.
Use the builder to create immutable instances:
ZoneConnection.builder()
.
Use the static factory method to create immutable instances:
ZoneConnection.of()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeZoneConnection
.static interface
static interface
static interface
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forZoneConnection
.static ZoneConnection
copyOf
(AbstractZoneConnection instance) Creates an immutable copy of aAbstractZoneConnection
value.double
boolean
This instance is equal to all instances ofZoneConnection
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:fromZoneId
,toZoneId
,crossingPenaltyMultiplier
.static ZoneConnection
Construct a new immutableZoneConnection
instance.toString()
Prints the immutable valueZoneConnection
with attribute values.toZoneId()
final ZoneConnection
withCrossingPenaltyMultiplier
(double value) Copy the current immutable object by setting a value for thecrossingPenaltyMultiplier
attribute.final ZoneConnection
withFromZoneId
(String value) Copy the current immutable object by setting a value for thefromZoneId
attribute.final ZoneConnection
withToZoneId
(String value) Copy the current immutable object by setting a value for thetoZoneId
attribute.Methods inherited from class com.dna.jopt.member.unit.zonemanager.AbstractZoneConnection
fromZoneCodes
-
Method Details
-
fromZoneId
- Specified by:
fromZoneId
in classAbstractZoneConnection
- Returns:
- The value of the
fromZoneId
attribute
-
toZoneId
- Specified by:
toZoneId
in classAbstractZoneConnection
- Returns:
- The value of the
toZoneId
attribute
-
crossingPenaltyMultiplier
public double crossingPenaltyMultiplier()- Overrides:
crossingPenaltyMultiplier
in classAbstractZoneConnection
- Returns:
- The value of the
crossingPenaltyMultiplier
attribute
-
withFromZoneId
Copy the current immutable object by setting a value for thefromZoneId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for fromZoneId- Returns:
- A modified copy of the
this
object
-
withToZoneId
Copy the current immutable object by setting a value for thetoZoneId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for toZoneId- Returns:
- A modified copy of the
this
object
-
withCrossingPenaltyMultiplier
Copy the current immutable object by setting a value for thecrossingPenaltyMultiplier
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for crossingPenaltyMultiplier- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofZoneConnection
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:fromZoneId
,toZoneId
,crossingPenaltyMultiplier
. -
toString
Prints the immutable valueZoneConnection
with attribute values. -
of
Construct a new immutableZoneConnection
instance.- Parameters:
fromZoneId
- The value for thefromZoneId
attributetoZoneId
- The value for thetoZoneId
attribute- Returns:
- An immutable ZoneConnection instance
-
copyOf
Creates an immutable copy of aAbstractZoneConnection
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 ZoneConnection instance
-
builder
Creates a builder forZoneConnection
.ZoneConnection.builder() .fromZoneId(String) // required
fromZoneId
.toZoneId(String) // requiredtoZoneId
.crossingPenaltyMultiplier(double) // optionalcrossingPenaltyMultiplier
.build();- Returns:
- A new ZoneConnection builder
-