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

  • Method Details

    • distance

      public javax.measure.Quantity<javax.measure.quantity.Length> distance()
      Specified by:
      distance in class AbstractReducedNodeEdgeConnectorItem
      Returns:
      The value of the distance attribute
    • time

      public Duration time()
      Specified by:
      time in class AbstractReducedNodeEdgeConnectorItem
      Returns:
      The value of the time attribute
    • fromElementId

      public String fromElementId()
      Specified by:
      fromElementId in class AbstractReducedNodeEdgeConnectorItem
      Returns:
      The value of the fromElementId attribute
    • toElementId

      public String toElementId()
      Specified by:
      toElementId in class AbstractReducedNodeEdgeConnectorItem
      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 the distance attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for distance
      Returns:
      A modified copy of the this object
    • withTime

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ReducedNodeEdgeConnectorItem 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: distance, time, fromElementId, toElementId.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ReducedNodeEdgeConnectorItem with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • of

      public static ReducedNodeEdgeConnectorItem of(javax.measure.Quantity<javax.measure.quantity.Length> distance, Duration time, String fromElementId, String toElementId)
      Construct a new immutable ReducedNodeEdgeConnectorItem instance.
      Parameters:
      distance - The value for the distance attribute
      time - The value for the time attribute
      fromElementId - The value for the fromElementId attribute
      toElementId - The value for the toElementId attribute
      Returns:
      An immutable ReducedNodeEdgeConnectorItem instance
    • copyOf

      Creates an immutable copy of a AbstractReducedNodeEdgeConnectorItem 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 for ReducedNodeEdgeConnectorItem.
       ReducedNodeEdgeConnectorItem.builder()
          .distance(javax.measure.Quantity&lt;javax.measure.quantity.Length&gt;) // required distance
          .time(java.time.Duration) // required time
          .fromElementId(String) // required fromElementId
          .toElementId(String) // required toElementId
          .build();
       
      Returns:
      A new ReducedNodeEdgeConnectorItem builder