Class ImmutableDecisionRow

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableDecisionRow
All Implemented Interfaces:
DecisionProgram.DecisionRow, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableDecisionRow extends Object implements DecisionProgram.DecisionRow
Immutable implementation of DecisionProgram.DecisionRow.

Use the builder to create immutable instances: ImmutableDecisionRow.builder().

See Also:
  • Method Details

    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface DecisionProgram.DecisionRow
      Returns:
      The value of the order attribute
    • getAccepts

      public com.google.common.collect.ImmutableList<DecisionProgram.DecisionRowAccepts> getAccepts()
      Specified by:
      getAccepts in interface DecisionProgram.DecisionRow
      Returns:
      The value of the accepts attribute
    • getReturns

      public com.google.common.collect.ImmutableList<DecisionProgram.DecisionRowReturns> getReturns()
      Specified by:
      getReturns in interface DecisionProgram.DecisionRow
      Returns:
      The value of the returns attribute
    • withOrder

      public final ImmutableDecisionRow withOrder(int value)
      Copy the current immutable object by setting a value for the order attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for order
      Returns:
      A modified copy of the this object
    • withAccepts

      public final ImmutableDecisionRow withAccepts(DecisionProgram.DecisionRowAccepts... elements)
      Copy the current immutable object with elements that replace the content of accepts.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withAccepts

      public final ImmutableDecisionRow withAccepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> elements)
      Copy the current immutable object with elements that replace the content of accepts. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of accepts elements to set
      Returns:
      A modified copy of this object
    • withReturns

      public final ImmutableDecisionRow withReturns(DecisionProgram.DecisionRowReturns... elements)
      Copy the current immutable object with elements that replace the content of returns.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withReturns

      public final ImmutableDecisionRow withReturns(Iterable<? extends DecisionProgram.DecisionRowReturns> elements)
      Copy the current immutable object with elements that replace the content of returns. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of returns elements to set
      Returns:
      A modified copy of this object
    • equals

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

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

      public static ImmutableDecisionRow copyOf(DecisionProgram.DecisionRow instance)
      Creates an immutable copy of a DecisionProgram.DecisionRow 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 DecisionRow instance
    • builder

      public static ImmutableDecisionRow.Builder builder()
      Creates a builder for ImmutableDecisionRow.
       ImmutableDecisionRow.builder()
          .order(int) // required order
          .addAccepts|addAllAccepts(io.resys.hdes.client.api.programs.DecisionProgram.DecisionRowAccepts) // accepts elements
          .addReturns|addAllReturns(io.resys.hdes.client.api.programs.DecisionProgram.DecisionRowReturns) // returns elements
          .build();
       
      Returns:
      A new ImmutableDecisionRow builder