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().

  • Method Details

    • typeName

      public String typeName()
      Overrides:
      typeName in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the typeName attribute
    • isActive

      public boolean isActive()
      Specified by:
      isActive in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the isActive attribute
    • prioritizeNodeConnectorOnFallbackSpeed

      public boolean prioritizeNodeConnectorOnFallbackSpeed()
      Specified by:
      prioritizeNodeConnectorOnFallbackSpeed in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the prioritizeNodeConnectorOnFallbackSpeed attribute
    • onlyApplyOnce

      public boolean onlyApplyOnce()
      Specified by:
      onlyApplyOnce in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the onlyApplyOnce attribute
    • invocationPosition

      public com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition invocationPosition()
      Overrides:
      invocationPosition in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the invocationPosition attribute
    • drivenTime

      public Duration drivenTime()
      Specified by:
      drivenTime in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the drivenTime attribute
    • drivenDistance

      public javax.measure.Quantity<javax.measure.quantity.Length> drivenDistance()
      Specified by:
      drivenDistance in class AbstractMaxDistanceConstructionHook
      Returns:
      The value of the drivenDistance attribute
    • withTypeName

      public final MaxDistanceConstructionHook withTypeName(String value)
      Copy the current immutable object by setting a value for the typeName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for typeName
      Returns:
      A modified copy or the this object
    • withIsActive

      public final MaxDistanceConstructionHook withIsActive(boolean value)
      Copy the current immutable object by setting a value for the isActive attribute. A value equality check is used to prevent copying of the same value by returning this.
      Specified by:
      withIsActive in interface IConstructionHook
      Overrides:
      withIsActive in class AbstractMaxDistanceConstructionHook
      Parameters:
      value - A new value for isActive
      Returns:
      A modified copy or the this object
    • withPrioritizeNodeConnectorOnFallbackSpeed

      public final MaxDistanceConstructionHook withPrioritizeNodeConnectorOnFallbackSpeed(boolean value)
      Copy the current immutable object by setting a value for the prioritizeNodeConnectorOnFallbackSpeed attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for prioritizeNodeConnectorOnFallbackSpeed
      Returns:
      A modified copy or the this object
    • withOnlyApplyOnce

      public final MaxDistanceConstructionHook withOnlyApplyOnce(boolean value)
      Copy the current immutable object by setting a value for the onlyApplyOnce attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for onlyApplyOnce
      Returns:
      A modified copy or the this object
    • withInvocationPosition

      public final MaxDistanceConstructionHook withInvocationPosition(com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition value)
      Copy the current immutable object by setting a value for the invocationPosition attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for invocationPosition
      Returns:
      A modified copy or the this object
    • withDrivenTime

      public final MaxDistanceConstructionHook withDrivenTime(Duration value)
      Copy the current immutable object by setting a value for the drivenTime attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for drivenTime
      Returns:
      A modified copy or the this object
    • withDrivenDistance

      public final MaxDistanceConstructionHook withDrivenDistance(javax.measure.Quantity<javax.measure.quantity.Length> value)
      Copy the current immutable object by setting a value for the drivenDistance attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for drivenDistance
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of MaxDistanceConstructionHook that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: typeName, isActive, prioritizeNodeConnectorOnFallbackSpeed, onlyApplyOnce, invocationPosition, drivenTime, drivenDistance.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value MaxDistanceConstructionHook with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • 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 immutable MaxDistanceConstructionHook instance.
      Parameters:
      typeName - The value for the typeName attribute
      isActive - The value for the isActive attribute
      prioritizeNodeConnectorOnFallbackSpeed - The value for the prioritizeNodeConnectorOnFallbackSpeed attribute
      onlyApplyOnce - The value for the onlyApplyOnce attribute
      invocationPosition - The value for the invocationPosition attribute
      drivenTime - The value for the drivenTime attribute
      drivenDistance - The value for the drivenDistance attribute
      Returns:
      An immutable MaxDistanceConstructionHook instance
    • copyOf

      Creates an immutable copy of a AbstractMaxDistanceConstructionHook 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 MaxDistanceConstructionHook instance
    • builder

      public static MaxDistanceConstructionHook.Builder builder()
      Creates a builder for MaxDistanceConstructionHook.
       MaxDistanceConstructionHook.builder()
          .typeName(String) // optional typeName
          .isActive(boolean) // required isActive
          .prioritizeNodeConnectorOnFallbackSpeed(boolean) // required prioritizeNodeConnectorOnFallbackSpeed
          .onlyApplyOnce(boolean) // required onlyApplyOnce
          .invocationPosition(com.dna.jopt.config.types.AbstractOptimizationConfig.AbstractConstructionHook.HookInvocationPosition) // optional invocationPosition
          .drivenTime(java.time.Duration) // required drivenTime
          .drivenDistance(javax.measure.Quantity<javax.measure.quantity.Length>) // required drivenDistance
          .build();
       
      Returns:
      A new MaxDistanceConstructionHook builder