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 classBuilds instances of typeZoneConnection.static interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forZoneConnection.static ZoneConnectioncopyOf(AbstractZoneConnection instance) Creates an immutable copy of aAbstractZoneConnectionvalue.doublebooleanThis instance is equal to all instances ofZoneConnectionthat have equal attribute values.inthashCode()Computes a hash code from attributes:fromZoneId,toZoneId,crossingPenaltyMultiplier.static ZoneConnectionConstruct a new immutableZoneConnectioninstance.toString()Prints the immutable valueZoneConnectionwith attribute values.toZoneId()final ZoneConnectionwithCrossingPenaltyMultiplier(double value) Copy the current immutable object by setting a value for thecrossingPenaltyMultiplierattribute.final ZoneConnectionwithFromZoneId(String value) Copy the current immutable object by setting a value for thefromZoneIdattribute.final ZoneConnectionwithToZoneId(String value) Copy the current immutable object by setting a value for thetoZoneIdattribute.Methods inherited from class com.dna.jopt.member.unit.zonemanager.AbstractZoneConnection
fromZoneCodes
-
Method Details
-
fromZoneId
- Specified by:
fromZoneIdin classAbstractZoneConnection- Returns:
- The value of the
fromZoneIdattribute
-
toZoneId
- Specified by:
toZoneIdin classAbstractZoneConnection- Returns:
- The value of the
toZoneIdattribute
-
crossingPenaltyMultiplier
public double crossingPenaltyMultiplier()- Overrides:
crossingPenaltyMultiplierin classAbstractZoneConnection- Returns:
- The value of the
crossingPenaltyMultiplierattribute
-
withFromZoneId
Copy the current immutable object by setting a value for thefromZoneIdattribute. 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
thisobject
-
withToZoneId
Copy the current immutable object by setting a value for thetoZoneIdattribute. 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
thisobject
-
withCrossingPenaltyMultiplier
Copy the current immutable object by setting a value for thecrossingPenaltyMultiplierattribute. 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
thisobject
-
equals
This instance is equal to all instances ofZoneConnectionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:fromZoneId,toZoneId,crossingPenaltyMultiplier. -
toString
Prints the immutable valueZoneConnectionwith attribute values. -
of
Construct a new immutableZoneConnectioninstance.- Parameters:
fromZoneId- The value for thefromZoneIdattributetoZoneId- The value for thetoZoneIdattribute- Returns:
- An immutable ZoneConnection instance
-
copyOf
Creates an immutable copy of aAbstractZoneConnectionvalue. 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) // requiredfromZoneId.toZoneId(String) // requiredtoZoneId.crossingPenaltyMultiplier(double) // optionalcrossingPenaltyMultiplier.build();- Returns:
- A new ZoneConnection builder
-