Class ImmutableDecisionProgram
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableDecisionProgram
- All Implemented Interfaces:
DecisionProgram,Program,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDecisionProgram
extends Object
implements DecisionProgram
Immutable implementation of
DecisionProgram.
Use the builder to create immutable instances:
ImmutableDecisionProgram.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionProgram.Nested classes/interfaces inherited from interface io.resys.hdes.client.api.programs.DecisionProgram
DecisionProgram.DecisionLog, DecisionProgram.DecisionLogEntry, DecisionProgram.DecisionResult, DecisionProgram.DecisionRow, DecisionProgram.DecisionRowAccepts, DecisionProgram.DecisionRowReturnsNested classes/interfaces inherited from interface io.resys.hdes.client.api.programs.Program
Program.ExecutionLog, Program.FlowExecutionLog, Program.ProgramContext, Program.ProgramContextNamedValue, Program.ProgramResult -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDecisionProgram.static ImmutableDecisionProgramcopyOf(DecisionProgram instance) Creates an immutable copy of aDecisionProgramvalue.booleanThis instance is equal to all instances ofImmutableDecisionProgramthat have equal attribute values.com.google.common.collect.ImmutableList<DecisionProgram.DecisionRow>getRows()inthashCode()Computes a hash code from attributes:rows,hitPolicy.toString()Prints the immutable valueDecisionProgramwith attribute values.final ImmutableDecisionProgramCopy the current immutable object by setting a value for thehitPolicyattribute.final ImmutableDecisionProgramwithRows(DecisionProgram.DecisionRow... elements) Copy the current immutable object with elements that replace the content ofrows.final ImmutableDecisionProgramwithRows(Iterable<? extends DecisionProgram.DecisionRow> elements) Copy the current immutable object with elements that replace the content ofrows.
-
Method Details
-
getRows
- Specified by:
getRowsin interfaceDecisionProgram- Returns:
- The value of the
rowsattribute
-
getHitPolicy
- Specified by:
getHitPolicyin interfaceDecisionProgram- Returns:
- The value of the
hitPolicyattribute
-
withRows
Copy the current immutable object with elements that replace the content ofrows.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRows
public final ImmutableDecisionProgram withRows(Iterable<? extends DecisionProgram.DecisionRow> elements) Copy the current immutable object with elements that replace the content ofrows. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of rows elements to set- Returns:
- A modified copy of
thisobject
-
withHitPolicy
Copy the current immutable object by setting a value for thehitPolicyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hitPolicy- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableDecisionProgramthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:rows,hitPolicy. -
toString
Prints the immutable valueDecisionProgramwith attribute values. -
copyOf
Creates an immutable copy of aDecisionProgramvalue. 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 DecisionProgram instance
-
builder
Creates a builder forImmutableDecisionProgram.ImmutableDecisionProgram.builder() .addRows|addAllRows(io.resys.hdes.client.api.programs.DecisionProgram.DecisionRow) //rowselements .hitPolicy(io.resys.hdes.client.api.ast.AstDecision.HitPolicy) // requiredhitPolicy.build();- Returns:
- A new ImmutableDecisionProgram builder
-