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 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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder from(GwtStepDto instance)
      Fill a builder with attribute values from the provided GwtStepDto instance. 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:
      this builder for use in a chained invocation
    • sentence

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder sentence(String sentence)
      Initializes the optional value sentence to sentence.
      Parameters:
      sentence - The value for sentence
      Returns:
      this builder for chained invocation
    • sentence

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder sentence(Optional<String> sentence)
      Initializes the optional value sentence to sentence.
      Parameters:
      sentence - The value for sentence
      Returns:
      this builder for use in a chained invocation
    • addSubSteps

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder addSubSteps(GwtStepDto element)
      Adds one element to subSteps list.
      Parameters:
      element - A subSteps element
      Returns:
      this builder for use in a chained invocation
    • addSubSteps

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder addSubSteps(GwtStepDto... elements)
      Adds elements to subSteps list.
      Parameters:
      elements - An array of subSteps elements
      Returns:
      this builder for use in a chained invocation
    • subSteps

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder subSteps(Iterable<? extends GwtStepDto> elements)
      Sets or replaces all elements for subSteps list.
      Parameters:
      elements - An iterable of subSteps elements
      Returns:
      this builder for use in a chained invocation
    • addAllSubSteps

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder addAllSubSteps(Iterable<? extends GwtStepDto> elements)
      Adds elements to subSteps list.
      Parameters:
      elements - An iterable of subSteps elements
      Returns:
      this builder for use in a chained invocation
    • implementation

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder implementation(GwtStepImplementationDto implementation)
      Initializes the optional value implementation to implementation.
      Parameters:
      implementation - The value for implementation
      Returns:
      this builder for chained invocation
    • implementation

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder implementation(Optional<? extends GwtStepImplementationDto> implementation)
      Initializes the optional value implementation to implementation.
      Parameters:
      implementation - The value for implementation
      Returns:
      this builder for use in a chained invocation
    • strategy

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder strategy(StrategyDto strategy)
      Initializes the optional value strategy to strategy.
      Parameters:
      strategy - The value for strategy
      Returns:
      this builder for chained invocation
    • strategy

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder strategy(Optional<? extends StrategyDto> strategy)
      Initializes the optional value strategy to strategy.
      Parameters:
      strategy - The value for strategy
      Returns:
      this builder for use in a chained invocation
    • xRef

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder xRef(String xRef)
      Initializes the optional value xRef to xRef.
      Parameters:
      xRef - The value for xRef
      Returns:
      this builder for chained invocation
    • xRef

      @CanIgnoreReturnValue public final ImmutableGwtStepDto.Builder xRef(Optional<String> xRef)
      Initializes the optional value xRef to xRef.
      Parameters:
      xRef - The value for xRef
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableGwtStepDto build()
      Builds a new ImmutableGwtStepDto.
      Returns:
      An immutable instance of GwtStepDto
      Throws:
      IllegalStateException - if any required attributes are missing