Class ImmutableComposableScenarioDto.Builder
- java.lang.Object
-
- com.chutneytesting.component.scenario.api.dto.ImmutableComposableScenarioDto.Builder
-
- Enclosing class:
- ImmutableComposableScenarioDto
@NotThreadSafe public static final class ImmutableComposableScenarioDto.Builder extends Object
Builds instances of typeImmutableComposableScenarioDto. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder from(ComposableTestCaseDto.ComposableScenarioDto instance)
Fill a builder with attribute values from the providedComposableScenarioDtoinstance. 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
-
addParameters
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder addParameters(KeyValue element)
Adds one element toparameterslist.- Parameters:
element- A parameters element- Returns:
thisbuilder for use in a chained invocation
-
addParameters
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder addParameters(KeyValue... elements)
Adds elements toparameterslist.- Parameters:
elements- An array of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
parameters
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder parameters(Iterable<? extends KeyValue> elements)
Sets or replaces all elements forparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParameters
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder addAllParameters(Iterable<? extends KeyValue> elements)
Adds elements toparameterslist.- Parameters:
elements- An iterable of parameters elements- Returns:
thisbuilder for use in a chained invocation
-
addComponentSteps
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder addComponentSteps(ComposableStepDto element)
Adds one element tocomponentStepslist.- Parameters:
element- A componentSteps element- Returns:
thisbuilder for use in a chained invocation
-
addComponentSteps
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder addComponentSteps(ComposableStepDto... elements)
Adds elements tocomponentStepslist.- Parameters:
elements- An array of componentSteps elements- Returns:
thisbuilder for use in a chained invocation
-
componentSteps
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder componentSteps(Iterable<? extends ComposableStepDto> elements)
Sets or replaces all elements forcomponentStepslist.- Parameters:
elements- An iterable of componentSteps elements- Returns:
thisbuilder for use in a chained invocation
-
addAllComponentSteps
@CanIgnoreReturnValue public final ImmutableComposableScenarioDto.Builder addAllComponentSteps(Iterable<? extends ComposableStepDto> elements)
Adds elements tocomponentStepslist.- Parameters:
elements- An iterable of componentSteps elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableComposableScenarioDto build()
Builds a newImmutableComposableScenarioDto.- Returns:
- An immutable instance of ComposableScenarioDto
- Throws:
IllegalStateException- if any required attributes are missing
-
-