Class ImmutableFlowProgram.Builder
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableFlowProgram.Builder
- Enclosing class:
- ImmutableFlowProgram
Builds instances of type
ImmutableFlowProgram.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionacceptDefs(Collection<TypeDef> acceptDefs) Initializes the value for theacceptDefsattribute.build()Builds a newImmutableFlowProgram.from(FlowProgram instance) Fill a builder with attribute values from the providedFlowPrograminstance.putAllSteps(Map<String, ? extends FlowProgram.FlowProgramStep> entries) Put all mappings from the specified map as entries tostepsmap.putSteps(String key, FlowProgram.FlowProgramStep value) Put one entry to thestepsmap.putSteps(Map.Entry<String, ? extends FlowProgram.FlowProgramStep> entry) Put one entry to thestepsmap.startStepId(String startStepId) Initializes the value for thestartStepIdattribute.steps(Map<String, ? extends FlowProgram.FlowProgramStep> entries) Sets or replaces all mappings from the specified map as entries for thestepsmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedFlowPrograminstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
acceptDefs
@CanIgnoreReturnValue public final ImmutableFlowProgram.Builder acceptDefs(Collection<TypeDef> acceptDefs) Initializes the value for theacceptDefsattribute.- Parameters:
acceptDefs- The value for acceptDefs- Returns:
thisbuilder for use in a chained invocation
-
startStepId
Initializes the value for thestartStepIdattribute.- Parameters:
startStepId- The value for startStepId- Returns:
thisbuilder for use in a chained invocation
-
putSteps
@CanIgnoreReturnValue public final ImmutableFlowProgram.Builder putSteps(String key, FlowProgram.FlowProgramStep value) Put one entry to thestepsmap.- Parameters:
key- The key in the steps mapvalue- The associated value in the steps map- Returns:
thisbuilder for use in a chained invocation
-
putSteps
@CanIgnoreReturnValue public final ImmutableFlowProgram.Builder putSteps(Map.Entry<String, ? extends FlowProgram.FlowProgramStep> entry) Put one entry to thestepsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
steps
@CanIgnoreReturnValue public final ImmutableFlowProgram.Builder steps(Map<String, ? extends FlowProgram.FlowProgramStep> entries) Sets or replaces all mappings from the specified map as entries for thestepsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the steps map- Returns:
thisbuilder for use in a chained invocation
-
putAllSteps
@CanIgnoreReturnValue public final ImmutableFlowProgram.Builder putAllSteps(Map<String, ? extends FlowProgram.FlowProgramStep> entries) Put all mappings from the specified map as entries tostepsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the steps map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFlowProgram.- Returns:
- An immutable instance of FlowProgram
- Throws:
IllegalStateException- if any required attributes are missing
-