Class ImmutableParentsStepDto.Builder
- java.lang.Object
-
- com.chutneytesting.component.scenario.api.dto.ImmutableParentsStepDto.Builder
-
- Enclosing class:
- ImmutableParentsStepDto
@NotThreadSafe public static final class ImmutableParentsStepDto.Builder extends Object
Builds instances of typeImmutableParentsStepDto. 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 ImmutableParentsStepDto.Builder from(ParentsStepDto instance)
Fill a builder with attribute values from the providedParentsStepDtoinstance. 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
-
addParentSteps
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder addParentSteps(ParentsStepDto.NameIdDto element)
Adds one element toparentStepslist.- Parameters:
element- A parentSteps element- Returns:
thisbuilder for use in a chained invocation
-
addParentSteps
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder addParentSteps(ParentsStepDto.NameIdDto... elements)
Adds elements toparentStepslist.- Parameters:
elements- An array of parentSteps elements- Returns:
thisbuilder for use in a chained invocation
-
parentSteps
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder parentSteps(Iterable<? extends ParentsStepDto.NameIdDto> elements)
Sets or replaces all elements forparentStepslist.- Parameters:
elements- An iterable of parentSteps elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParentSteps
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder addAllParentSteps(Iterable<? extends ParentsStepDto.NameIdDto> elements)
Adds elements toparentStepslist.- Parameters:
elements- An iterable of parentSteps elements- Returns:
thisbuilder for use in a chained invocation
-
addParentScenario
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder addParentScenario(ParentsStepDto.NameIdDto element)
Adds one element toparentScenariolist.- Parameters:
element- A parentScenario element- Returns:
thisbuilder for use in a chained invocation
-
addParentScenario
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder addParentScenario(ParentsStepDto.NameIdDto... elements)
Adds elements toparentScenariolist.- Parameters:
elements- An array of parentScenario elements- Returns:
thisbuilder for use in a chained invocation
-
parentScenario
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder parentScenario(Iterable<? extends ParentsStepDto.NameIdDto> elements)
Sets or replaces all elements forparentScenariolist.- Parameters:
elements- An iterable of parentScenario elements- Returns:
thisbuilder for use in a chained invocation
-
addAllParentScenario
@CanIgnoreReturnValue public final ImmutableParentsStepDto.Builder addAllParentScenario(Iterable<? extends ParentsStepDto.NameIdDto> elements)
Adds elements toparentScenariolist.- Parameters:
elements- An iterable of parentScenario elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableParentsStepDto build()
Builds a newImmutableParentsStepDto.- Returns:
- An immutable instance of ParentsStepDto
- Throws:
IllegalStateException- if any required attributes are missing
-
-