Class ImmutableParentsStepDto.Builder
java.lang.Object
com.chutneytesting.component.scenario.api.dto.ImmutableParentsStepDto.Builder
- Enclosing class:
- ImmutableParentsStepDto
Builds instances of type
ImmutableParentsStepDto.
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 TypeMethodDescriptionaddAllParentScenario(Iterable<? extends ParentsStepDto.NameIdDto> elements) Adds elements toparentScenariolist.addAllParentSteps(Iterable<? extends ParentsStepDto.NameIdDto> elements) Adds elements toparentStepslist.Adds one element toparentScenariolist.addParentScenario(ParentsStepDto.NameIdDto... elements) Adds elements toparentScenariolist.addParentSteps(ParentsStepDto.NameIdDto element) Adds one element toparentStepslist.addParentSteps(ParentsStepDto.NameIdDto... elements) Adds elements toparentStepslist.build()Builds a newImmutableParentsStepDto.from(ParentsStepDto instance) Fill a builder with attribute values from the providedParentsStepDtoinstance.parentScenario(Iterable<? extends ParentsStepDto.NameIdDto> elements) Sets or replaces all elements forparentScenariolist.parentSteps(Iterable<? extends ParentsStepDto.NameIdDto> elements) Sets or replaces all elements forparentStepslist.
-
Method Details
-
from
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
Builds a newImmutableParentsStepDto.- Returns:
- An immutable instance of ParentsStepDto
- Throws:
IllegalStateException- if any required attributes are missing
-