Class ImmutableGwtStepDto.Builder
- java.lang.Object
-
- com.chutneytesting.scenario.api.raw.dto.ImmutableGwtStepDto.Builder
-
- Enclosing class:
- ImmutableGwtStepDto
@NotThreadSafe public static final class ImmutableGwtStepDto.Builder extends Object
Builds instances of typeImmutableGwtStepDto. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableGwtStepDto.BuilderaddAllSubSteps(Iterable<? extends GwtStepDto> elements)Adds elements tosubStepslist.ImmutableGwtStepDto.BuilderaddSubSteps(GwtStepDto element)Adds one element tosubStepslist.ImmutableGwtStepDto.BuilderaddSubSteps(GwtStepDto... elements)Adds elements tosubStepslist.ImmutableGwtStepDtobuild()Builds a newImmutableGwtStepDto.ImmutableGwtStepDto.Builderfrom(GwtStepDto instance)Fill a builder with attribute values from the providedGwtStepDtoinstance.ImmutableGwtStepDto.Builderimplementation(GwtStepImplementationDto implementation)Initializes the optional valueimplementationto implementation.ImmutableGwtStepDto.Builderimplementation(Optional<? extends GwtStepImplementationDto> implementation)Initializes the optional valueimplementationto implementation.ImmutableGwtStepDto.Buildersentence(String sentence)Initializes the optional valuesentenceto sentence.ImmutableGwtStepDto.Buildersentence(Optional<String> sentence)Initializes the optional valuesentenceto sentence.ImmutableGwtStepDto.Builderstrategy(StrategyDto strategy)Initializes the optional valuestrategyto strategy.ImmutableGwtStepDto.Builderstrategy(Optional<? extends StrategyDto> strategy)Initializes the optional valuestrategyto strategy.ImmutableGwtStepDto.BuildersubSteps(Iterable<? extends GwtStepDto> elements)Sets or replaces all elements forsubStepslist.ImmutableGwtStepDto.BuilderxRef(String xRef)Initializes the optional valuexRefto xRef.ImmutableGwtStepDto.BuilderxRef(Optional<String> xRef)Initializes the optional valuexRefto xRef.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder from(GwtStepDto instance)
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
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder sentence(String sentence)
Initializes the optional valuesentenceto sentence.- Parameters:
sentence- The value for sentence- Returns:
thisbuilder for chained invocation
-
sentence
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder sentence(Optional<String> sentence)
Initializes the optional valuesentenceto sentence.- Parameters:
sentence- The value for sentence- Returns:
thisbuilder for use in a chained invocation
-
addSubSteps
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder addSubSteps(GwtStepDto element)
Adds one element tosubStepslist.- Parameters:
element- A subSteps element- Returns:
thisbuilder for use in a chained invocation
-
addSubSteps
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder addSubSteps(GwtStepDto... elements)
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
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder strategy(StrategyDto 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
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder xRef(String xRef)
Initializes the optional valuexRefto xRef.- Parameters:
xRef- The value for xRef- Returns:
thisbuilder for chained invocation
-
xRef
@CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder xRef(Optional<String> xRef)
Initializes the optional valuexRefto xRef.- Parameters:
xRef- The value for xRef- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableGwtStepDto build()
Builds a newImmutableGwtStepDto.- Returns:
- An immutable instance of GwtStepDto
- Throws:
IllegalStateException- if any required attributes are missing
-
-