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 ofStrategyDto.Use the builder to create immutable instances:
ImmutableStrategyDto.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableStrategyDto.BuilderBuilds instances of typeImmutableStrategyDto.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableStrategyDto.Builderbuilder()Creates a builder forImmutableStrategyDto.static ImmutableStrategyDtocopyOf(StrategyDto instance)Creates an immutable copy of aStrategyDtovalue.booleanequals(Object another)This instance is equal to all instances ofImmutableStrategyDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:type,parameters.Map<String,Object>parameters()StringtoString()Prints the immutable valueStrategyDtowith attribute values.Stringtype()ImmutableStrategyDtowithParameters(Map<String,? extends Object> entries)Copy the current immutable object by replacing theparametersmap with the specified map.ImmutableStrategyDtowithType(String value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
type
public String type()
- Specified by:
typein interfaceStrategyDto- Returns:
- The value of the
typeattribute
-
parameters
public Map<String,Object> parameters()
- Specified by:
parametersin interfaceStrategyDto- Returns:
- The value of the
parametersattribute
-
withType
public final ImmutableStrategyDto withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withParameters
public final ImmutableStrategyDto withParameters(Map<String,? extends Object> entries)
Copy the current immutable object by replacing theparametersmap 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 returningthis.- Parameters:
entries- The entries to be added to the parameters map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableStrategyDtothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:type,parameters.
-
toString
public String toString()
Prints the immutable valueStrategyDtowith attribute values.
-
copyOf
public static ImmutableStrategyDto copyOf(StrategyDto instance)
Creates an immutable copy of aStrategyDtovalue. 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 forImmutableStrategyDto.ImmutableStrategyDto.builder() .type(String) // optionaltype.putParameters|putAllParameters(String => Object) //parametersmappings .build();- Returns:
- A new ImmutableStrategyDto builder
-
-