Class ImmutableGwtScenarioDto
- java.lang.Object
-
- com.chutneytesting.scenario.api.raw.dto.ImmutableGwtScenarioDto
-
- All Implemented Interfaces:
GwtScenarioDto
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableGwtScenarioDto extends Object implements GwtScenarioDto
Immutable implementation ofGwtScenarioDto.Use the builder to create immutable instances:
ImmutableGwtScenarioDto.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableGwtScenarioDto.BuilderBuilds instances of typeImmutableGwtScenarioDto.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableGwtScenarioDto.Builderbuilder()Creates a builder forImmutableGwtScenarioDto.static ImmutableGwtScenarioDtocopyOf(GwtScenarioDto instance)Creates an immutable copy of aGwtScenarioDtovalue.booleanequals(Object another)This instance is equal to all instances ofImmutableGwtScenarioDtothat have equal attribute values.List<GwtStepDto>givens()inthashCode()Computes a hash code from attributes:givens,when,thens.List<GwtStepDto>thens()StringtoString()Prints the immutable valueGwtScenarioDtowith attribute values.GwtStepDtowhen()ImmutableGwtScenarioDtowithGivens(GwtStepDto... elements)Copy the current immutable object with elements that replace the content ofgivens.ImmutableGwtScenarioDtowithGivens(Iterable<? extends GwtStepDto> elements)Copy the current immutable object with elements that replace the content ofgivens.ImmutableGwtScenarioDtowithThens(GwtStepDto... elements)Copy the current immutable object with elements that replace the content ofthens.ImmutableGwtScenarioDtowithThens(Iterable<? extends GwtStepDto> elements)Copy the current immutable object with elements that replace the content ofthens.ImmutableGwtScenarioDtowithWhen(GwtStepDto value)Copy the current immutable object by setting a value for thewhenattribute.
-
-
-
Method Detail
-
givens
public List<GwtStepDto> givens()
- Specified by:
givensin interfaceGwtScenarioDto- Returns:
- The value of the
givensattribute
-
when
public GwtStepDto when()
- Specified by:
whenin interfaceGwtScenarioDto- Returns:
- The value of the
whenattribute
-
thens
public List<GwtStepDto> thens()
- Specified by:
thensin interfaceGwtScenarioDto- Returns:
- The value of the
thensattribute
-
withGivens
public final ImmutableGwtScenarioDto withGivens(GwtStepDto... elements)
Copy the current immutable object with elements that replace the content ofgivens.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGivens
public final ImmutableGwtScenarioDto withGivens(Iterable<? extends GwtStepDto> elements)
Copy the current immutable object with elements that replace the content ofgivens. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of givens elements to set- Returns:
- A modified copy of
thisobject
-
withWhen
public final ImmutableGwtScenarioDto withWhen(GwtStepDto value)
Copy the current immutable object by setting a value for thewhenattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for when- Returns:
- A modified copy of the
thisobject
-
withThens
public final ImmutableGwtScenarioDto withThens(GwtStepDto... elements)
Copy the current immutable object with elements that replace the content ofthens.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withThens
public final ImmutableGwtScenarioDto withThens(Iterable<? extends GwtStepDto> elements)
Copy the current immutable object with elements that replace the content ofthens. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of thens elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableGwtScenarioDtothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:givens,when,thens.
-
toString
public String toString()
Prints the immutable valueGwtScenarioDtowith attribute values.
-
copyOf
public static ImmutableGwtScenarioDto copyOf(GwtScenarioDto instance)
Creates an immutable copy of aGwtScenarioDtovalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable GwtScenarioDto instance
-
builder
public static ImmutableGwtScenarioDto.Builder builder()
Creates a builder forImmutableGwtScenarioDto.ImmutableGwtScenarioDto.builder() .addGivens|addAllGivens(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) //givenselements .when(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) // requiredwhen.addThens|addAllThens(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) //thenselements .build();- Returns:
- A new ImmutableGwtScenarioDto builder
-
-