Class ImmutableNameIdDto
java.lang.Object
com.chutneytesting.component.scenario.api.dto.ImmutableNameIdDto
- All Implemented Interfaces:
ParentsStepDto.NameIdDto
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableNameIdDto
extends Object
implements ParentsStepDto.NameIdDto
Immutable implementation of
ParentsStepDto.NameIdDto.
Use the builder to create immutable instances:
ImmutableNameIdDto.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableNameIdDto.Builderbuilder()Creates a builder forImmutableNameIdDto.static ImmutableNameIdDtocopyOf(ParentsStepDto.NameIdDto instance) Creates an immutable copy of aParentsStepDto.NameIdDtovalue.booleanThis instance is equal to all instances ofImmutableNameIdDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name.id()name()toString()Prints the immutable valueNameIdDtowith attribute values.final ImmutableNameIdDtoCopy the current immutable object by setting a value for theidattribute.final ImmutableNameIdDtoCopy the current immutable object by setting a value for thenameattribute.
-
Method Details
-
id
- Specified by:
idin interfaceParentsStepDto.NameIdDto- Returns:
- The value of the
idattribute
-
name
- Specified by:
namein interfaceParentsStepDto.NameIdDto- Returns:
- The value of the
nameattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableNameIdDtothat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name. -
toString
Prints the immutable valueNameIdDtowith attribute values. -
copyOf
Creates an immutable copy of aParentsStepDto.NameIdDtovalue. 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 NameIdDto instance
-
builder
Creates a builder forImmutableNameIdDto.ImmutableNameIdDto.builder() .id(String) // requiredid.name(String) // requiredname.build();- Returns:
- A new ImmutableNameIdDto builder
-