Class ImmutableDecisionLog

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

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

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

See Also:
  • Method Details

    • getMatch

      public Boolean getMatch()
      Specified by:
      getMatch in interface DecisionProgram.DecisionLog
      Returns:
      The value of the match attribute
    • getOrder

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

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

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

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

      public final ImmutableDecisionLog withOrder(Integer value)
      Copy the current immutable object by setting a value for the order attribute. An equals check 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 ImmutableDecisionLog withAccepts(DecisionProgram.DecisionLogEntry... 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 ImmutableDecisionLog withAccepts(Iterable<? extends DecisionProgram.DecisionLogEntry> 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 ImmutableDecisionLog withReturns(DecisionProgram.DecisionLogEntry... 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 ImmutableDecisionLog withReturns(Iterable<? extends DecisionProgram.DecisionLogEntry> 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 ImmutableDecisionLog 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: match, order, accepts, returns.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static ImmutableDecisionLog.Builder builder()
      Creates a builder for ImmutableDecisionLog.
       ImmutableDecisionLog.builder()
          .match(Boolean) // required match
          .order(Integer) // required order
          .addAccepts|addAllAccepts(io.resys.hdes.client.api.programs.DecisionProgram.DecisionLogEntry) // accepts elements
          .addReturns|addAllReturns(io.resys.hdes.client.api.programs.DecisionProgram.DecisionLogEntry) // returns elements
          .build();
       
      Returns:
      A new ImmutableDecisionLog builder