Class ImmutableStrategyDto

java.lang.Object
com.chutneytesting.component.scenario.api.dto.ImmutableStrategyDto
All Implemented Interfaces:
StrategyDto

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableStrategyDto extends Object implements StrategyDto
Immutable implementation of StrategyDto.

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

  • Method Details

    • type

      public String type()
      Specified by:
      type in interface StrategyDto
      Returns:
      The value of the type attribute
    • parameters

      public Map<String,Object> parameters()
      Specified by:
      parameters in interface StrategyDto
      Returns:
      The value of the parameters attribute
    • withType

      public final ImmutableStrategyDto withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy of the this object
    • withParameters

      public final ImmutableStrategyDto withParameters(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the parameters map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the parameters map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableStrategyDto 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: type, parameters.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableStrategyDto copyOf(StrategyDto instance)
      Creates an immutable copy of a StrategyDto 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 StrategyDto instance
    • builder

      public static ImmutableStrategyDto.Builder builder()
      Creates a builder for ImmutableStrategyDto.
       ImmutableStrategyDto.builder()
          .type(String) // optional type
          .putParameters|putAllParameters(String => Object) // parameters mappings
          .build();
       
      Returns:
      A new ImmutableStrategyDto builder