Class ImmutableGwtStepDto.Builder
java.lang.Object
com.chutneytesting.scenario.api.raw.dto.ImmutableGwtStepDto.Builder
- Enclosing class:
- ImmutableGwtStepDto
Builds instances of type
ImmutableGwtStepDto.
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 TypeMethodDescriptionaddAllSubSteps(Iterable<? extends GwtStepDto> elements) Adds elements tosubStepslist.addSubSteps(GwtStepDto element) Adds one element tosubStepslist.addSubSteps(GwtStepDto... elements) Adds elements tosubStepslist.build()Builds a newImmutableGwtStepDto.from(GwtStepDto instance) Fill a builder with attribute values from the providedGwtStepDtoinstance.implementation(GwtStepImplementationDto implementation) Initializes the optional valueimplementationto implementation.implementation(Optional<? extends GwtStepImplementationDto> implementation) Initializes the optional valueimplementationto implementation.Initializes the optional valuesentenceto sentence.Initializes the optional valuesentenceto sentence.strategy(StrategyDto strategy) Initializes the optional valuestrategyto strategy.strategy(Optional<? extends StrategyDto> strategy) Initializes the optional valuestrategyto strategy.subSteps(Iterable<? extends GwtStepDto> elements) Sets or replaces all elements forsubStepslist.Initializes the optional valuexRefto xRef.Initializes the optional valuexRefto xRef.
-
Method Details
-
from
Fill a builder with attribute values from the providedGwtStepDtoinstance. 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
-
sentence
Initializes the optional valuesentenceto sentence.- Parameters:
sentence- The value for sentence- Returns:
thisbuilder for chained invocation
-
sentence
Initializes the optional valuesentenceto sentence.- Parameters:
sentence- The value for sentence- Returns:
thisbuilder for use in a chained invocation
-
addSubSteps
Adds one element tosubStepslist.- Parameters:
element- A subSteps element- Returns:
thisbuilder for use in a chained invocation
-
addSubSteps
Adds elements tosubStepslist.- Parameters:
elements- An array of subSteps elements- Returns:
thisbuilder for use in a chained invocation
-
subSteps
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder subSteps(Iterable<? extends GwtStepDto> elements) Sets or replaces all elements forsubStepslist.- Parameters:
elements- An iterable of subSteps elements- Returns:
thisbuilder for use in a chained invocation
-
addAllSubSteps
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder addAllSubSteps(Iterable<? extends GwtStepDto> elements) Adds elements tosubStepslist.- Parameters:
elements- An iterable of subSteps elements- Returns:
thisbuilder for use in a chained invocation
-
implementation
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder implementation(GwtStepImplementationDto implementation) Initializes the optional valueimplementationto implementation.- Parameters:
implementation- The value for implementation- Returns:
thisbuilder for chained invocation
-
implementation
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder implementation(Optional<? extends GwtStepImplementationDto> implementation) Initializes the optional valueimplementationto implementation.- Parameters:
implementation- The value for implementation- Returns:
thisbuilder for use in a chained invocation
-
strategy
Initializes the optional valuestrategyto strategy.- Parameters:
strategy- The value for strategy- Returns:
thisbuilder for chained invocation
-
strategy
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder strategy(Optional<? extends StrategyDto> strategy) Initializes the optional valuestrategyto strategy.- Parameters:
strategy- The value for strategy- Returns:
thisbuilder for use in a chained invocation
-
xRef
Initializes the optional valuexRefto xRef.- Parameters:
xRef- The value for xRef- Returns:
thisbuilder for chained invocation
-
xRef
Initializes the optional valuexRefto xRef.- Parameters:
xRef- The value for xRef- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableGwtStepDto.- Returns:
- An immutable instance of GwtStepDto
- Throws:
IllegalStateException- if any required attributes are missing
-