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 of GwtScenarioDto.

Use the builder to create immutable instances: ImmutableGwtScenarioDto.builder().

  • Method Details

    • givens

      public List<GwtStepDto> givens()
      Specified by:
      givens in interface GwtScenarioDto
      Returns:
      The value of the givens attribute
    • when

      public GwtStepDto when()
      Specified by:
      when in interface GwtScenarioDto
      Returns:
      The value of the when attribute
    • thens

      public List<GwtStepDto> thens()
      Specified by:
      thens in interface GwtScenarioDto
      Returns:
      The value of the thens attribute
    • withGivens

      public final ImmutableGwtScenarioDto withGivens(GwtStepDto... elements)
      Copy the current immutable object with elements that replace the content of givens.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withGivens

      public final ImmutableGwtScenarioDto withGivens(Iterable<? extends GwtStepDto> elements)
      Copy the current immutable object with elements that replace the content of givens. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of givens elements to set
      Returns:
      A modified copy of this object
    • withWhen

      public final ImmutableGwtScenarioDto withWhen(GwtStepDto value)
      Copy the current immutable object by setting a value for the when attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for when
      Returns:
      A modified copy of the this object
    • withThens

      public final ImmutableGwtScenarioDto withThens(GwtStepDto... elements)
      Copy the current immutable object with elements that replace the content of thens.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withThens

      public final ImmutableGwtScenarioDto withThens(Iterable<? extends GwtStepDto> elements)
      Copy the current immutable object with elements that replace the content of thens. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of thens elements to set
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableGwtScenarioDto that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: givens, when, thens.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value GwtScenarioDto with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableGwtScenarioDto copyOf(GwtScenarioDto instance)
      Creates an immutable copy of a GwtScenarioDto value. 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 for ImmutableGwtScenarioDto.
       ImmutableGwtScenarioDto.builder()
          .addGivens|addAllGivens(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) // givens elements
          .when(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) // required when
          .addThens|addAllThens(com.chutneytesting.scenario.api.raw.dto.GwtStepDto) // thens elements
          .build();
       
      Returns:
      A new ImmutableGwtScenarioDto builder