Package com.dna.jopt.member.unit.hook
Class MaxDistanceConstructionHook
java.lang.Object
com.dna.jopt.member.unit.hook.AbstractMaxDistanceConstructionHook
com.dna.jopt.member.unit.hook.MaxDistanceConstructionHook
- All Implemented Interfaces:
com.dna.jopt.config.types.HookType,IConstructionHook
@Generated(from="AbstractMaxDistanceConstructionHook",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class MaxDistanceConstructionHook
extends AbstractMaxDistanceConstructionHook
Immutable implementation of
AbstractMaxDistanceConstructionHook.
Use the builder to create immutable instances:
MaxDistanceConstructionHook.builder().
Use the static factory method to create immutable instances:
MaxDistanceConstructionHook.of().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeMaxDistanceConstructionHook. -
Field Summary
Fields inherited from class com.dna.jopt.member.unit.hook.AbstractMaxDistanceConstructionHook
TYPE_NAME -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forMaxDistanceConstructionHook.static MaxDistanceConstructionHookcopyOf(AbstractMaxDistanceConstructionHook instance) Creates an immutable copy of aAbstractMaxDistanceConstructionHookvalue.javax.measure.Quantity<javax.measure.quantity.Length>booleanThis instance is equal to all instances ofMaxDistanceConstructionHookthat have equal attribute values.inthashCode()Computes a hash code from attributes:typeName,isActive,prioritizeNodeConnectorOnFallbackSpeed,onlyApplyOnce,invocationPosition,drivenTime,drivenDistance.com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPositionbooleanisActive()static MaxDistanceConstructionHookof(String typeName, boolean isActive, boolean prioritizeNodeConnectorOnFallbackSpeed, boolean onlyApplyOnce, com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition invocationPosition, Duration drivenTime, javax.measure.Quantity<javax.measure.quantity.Length> drivenDistance) Construct a new immutableMaxDistanceConstructionHookinstance.booleanbooleantoString()Prints the immutable valueMaxDistanceConstructionHookwith attribute values.typeName()withDrivenDistance(javax.measure.Quantity<javax.measure.quantity.Length> value) Copy the current immutable object by setting a value for thedrivenDistanceattribute.withDrivenTime(Duration value) Copy the current immutable object by setting a value for thedrivenTimeattribute.withInvocationPosition(com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition value) Copy the current immutable object by setting a value for theinvocationPositionattribute.withIsActive(boolean value) Copy the current immutable object by setting a value for theisActiveattribute.withOnlyApplyOnce(boolean value) Copy the current immutable object by setting a value for theonlyApplyOnceattribute.withPrioritizeNodeConnectorOnFallbackSpeed(boolean value) Copy the current immutable object by setting a value for theprioritizeNodeConnectorOnFallbackSpeedattribute.withTypeName(String value) Copy the current immutable object by setting a value for thetypeNameattribute.Methods inherited from class com.dna.jopt.member.unit.hook.AbstractMaxDistanceConstructionHook
apply, getInvocationPosition, isOnlyApplyOnce
-
Method Details
-
typeName
- Overrides:
typeNamein classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
typeNameattribute
-
isActive
public boolean isActive()- Specified by:
isActivein classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
isActiveattribute
-
prioritizeNodeConnectorOnFallbackSpeed
public boolean prioritizeNodeConnectorOnFallbackSpeed()- Specified by:
prioritizeNodeConnectorOnFallbackSpeedin classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
prioritizeNodeConnectorOnFallbackSpeedattribute
-
onlyApplyOnce
public boolean onlyApplyOnce()- Specified by:
onlyApplyOncein classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
onlyApplyOnceattribute
-
invocationPosition
public com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition invocationPosition()- Overrides:
invocationPositionin classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
invocationPositionattribute
-
drivenTime
- Specified by:
drivenTimein classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
drivenTimeattribute
-
drivenDistance
public javax.measure.Quantity<javax.measure.quantity.Length> drivenDistance()- Specified by:
drivenDistancein classAbstractMaxDistanceConstructionHook- Returns:
- The value of the
drivenDistanceattribute
-
withTypeName
Copy the current immutable object by setting a value for thetypeNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for typeName- Returns:
- A modified copy or the
thisobject
-
withIsActive
Copy the current immutable object by setting a value for theisActiveattribute. A value equality check is used to prevent copying of the same value by returningthis.- Specified by:
withIsActivein interfaceIConstructionHook- Overrides:
withIsActivein classAbstractMaxDistanceConstructionHook- Parameters:
value- A new value for isActive- Returns:
- A modified copy or the
thisobject
-
withPrioritizeNodeConnectorOnFallbackSpeed
Copy the current immutable object by setting a value for theprioritizeNodeConnectorOnFallbackSpeedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for prioritizeNodeConnectorOnFallbackSpeed- Returns:
- A modified copy or the
thisobject
-
withOnlyApplyOnce
Copy the current immutable object by setting a value for theonlyApplyOnceattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for onlyApplyOnce- Returns:
- A modified copy or the
thisobject
-
withInvocationPosition
public final MaxDistanceConstructionHook withInvocationPosition(com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition value) Copy the current immutable object by setting a value for theinvocationPositionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for invocationPosition- Returns:
- A modified copy or the
thisobject
-
withDrivenTime
Copy the current immutable object by setting a value for thedrivenTimeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for drivenTime- Returns:
- A modified copy or the
thisobject
-
withDrivenDistance
public final MaxDistanceConstructionHook withDrivenDistance(javax.measure.Quantity<javax.measure.quantity.Length> value) Copy the current immutable object by setting a value for thedrivenDistanceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for drivenDistance- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofMaxDistanceConstructionHookthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:typeName,isActive,prioritizeNodeConnectorOnFallbackSpeed,onlyApplyOnce,invocationPosition,drivenTime,drivenDistance. -
toString
Prints the immutable valueMaxDistanceConstructionHookwith attribute values. -
of
public static MaxDistanceConstructionHook of(String typeName, boolean isActive, boolean prioritizeNodeConnectorOnFallbackSpeed, boolean onlyApplyOnce, com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition invocationPosition, Duration drivenTime, javax.measure.Quantity<javax.measure.quantity.Length> drivenDistance) Construct a new immutableMaxDistanceConstructionHookinstance.- Parameters:
typeName- The value for thetypeNameattributeisActive- The value for theisActiveattributeprioritizeNodeConnectorOnFallbackSpeed- The value for theprioritizeNodeConnectorOnFallbackSpeedattributeonlyApplyOnce- The value for theonlyApplyOnceattributeinvocationPosition- The value for theinvocationPositionattributedrivenTime- The value for thedrivenTimeattributedrivenDistance- The value for thedrivenDistanceattribute- Returns:
- An immutable MaxDistanceConstructionHook instance
-
copyOf
Creates an immutable copy of aAbstractMaxDistanceConstructionHookvalue. 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 MaxDistanceConstructionHook instance
-
builder
Creates a builder forMaxDistanceConstructionHook.MaxDistanceConstructionHook.builder() .typeName(String) // optionaltypeName.isActive(boolean) // requiredisActive.prioritizeNodeConnectorOnFallbackSpeed(boolean) // requiredprioritizeNodeConnectorOnFallbackSpeed.onlyApplyOnce(boolean) // requiredonlyApplyOnce.invocationPosition(com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition) // optionalinvocationPosition.drivenTime(java.time.Duration) // requireddrivenTime.drivenDistance(javax.measure.Quantity<javax.measure.quantity.Length>) // requireddrivenDistance.build();- Returns:
- A new MaxDistanceConstructionHook builder
-