Class ImmutableFlowProgram
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableFlowProgram
- All Implemented Interfaces:
FlowProgram,Program,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableFlowProgram
extends Object
implements FlowProgram
Immutable implementation of
FlowProgram.
Use the builder to create immutable instances:
ImmutableFlowProgram.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFlowProgram.Nested classes/interfaces inherited from interface io.resys.hdes.client.api.programs.FlowProgram
FlowProgram.FlowExecutionStatus, FlowProgram.FlowProgramStep, FlowProgram.FlowProgramStepBody, FlowProgram.FlowProgramStepConditionalThenPointer, FlowProgram.FlowProgramStepEndPointer, FlowProgram.FlowProgramStepPointer, FlowProgram.FlowProgramStepPointerType, FlowProgram.FlowProgramStepRefType, FlowProgram.FlowProgramStepThenPointer, FlowProgram.FlowProgramStepWhenThenPointer, FlowProgram.FlowResult, FlowProgram.FlowResultErrorLog, FlowProgram.FlowResultLogNested 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 TypeMethodDescriptionstatic ImmutableFlowProgram.Builderbuilder()Creates a builder forImmutableFlowProgram.static ImmutableFlowProgramcopyOf(FlowProgram instance) Creates an immutable copy of aFlowProgramvalue.booleanThis instance is equal to all instances ofImmutableFlowProgramthat have equal attribute values.com.google.common.collect.ImmutableMap<String,FlowProgram.FlowProgramStep> getSteps()inthashCode()Computes a hash code from attributes:acceptDefs,startStepId,steps.toString()Prints the immutable valueFlowProgramwith attribute values.final ImmutableFlowProgramwithAcceptDefs(Collection<TypeDef> value) Copy the current immutable object by setting a value for theacceptDefsattribute.final ImmutableFlowProgramwithStartStepId(String value) Copy the current immutable object by setting a value for thestartStepIdattribute.final ImmutableFlowProgramwithSteps(Map<String, ? extends FlowProgram.FlowProgramStep> entries) Copy the current immutable object by replacing thestepsmap with the specified map.
-
Method Details
-
getAcceptDefs
- Specified by:
getAcceptDefsin interfaceFlowProgram- Returns:
- The value of the
acceptDefsattribute
-
getStartStepId
- Specified by:
getStartStepIdin interfaceFlowProgram- Returns:
- The value of the
startStepIdattribute
-
getSteps
- Specified by:
getStepsin interfaceFlowProgram- Returns:
- The value of the
stepsattribute
-
withAcceptDefs
Copy the current immutable object by setting a value for theacceptDefsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for acceptDefs- Returns:
- A modified copy of the
thisobject
-
withStartStepId
Copy the current immutable object by setting a value for thestartStepIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for startStepId- Returns:
- A modified copy of the
thisobject
-
withSteps
public final ImmutableFlowProgram withSteps(Map<String, ? extends FlowProgram.FlowProgramStep> entries) Copy the current immutable object by replacing thestepsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the steps map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableFlowProgramthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:acceptDefs,startStepId,steps. -
toString
Prints the immutable valueFlowProgramwith attribute values. -
copyOf
Creates an immutable copy of aFlowProgramvalue. 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 FlowProgram instance
-
builder
Creates a builder forImmutableFlowProgram.ImmutableFlowProgram.builder() .acceptDefs(Collection<io.resys.hdes.client.api.ast.TypeDef>) // requiredacceptDefs.startStepId(String) // requiredstartStepId.putSteps|putAllSteps(String => io.resys.hdes.client.api.programs.FlowProgram.FlowProgramStep) //stepsmappings .build();- Returns:
- A new ImmutableFlowProgram builder
-