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 ofParentsStepDto.NameIdDto.Use the builder to create immutable instances:
ImmutableNameIdDto.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNameIdDto.BuilderBuilds instances of typeImmutableNameIdDto.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableNameIdDto.Builderbuilder()Creates a builder forImmutableNameIdDto.static ImmutableNameIdDtocopyOf(ParentsStepDto.NameIdDto instance)Creates an immutable copy of aParentsStepDto.NameIdDtovalue.booleanequals(Object another)This instance is equal to all instances ofImmutableNameIdDtothat have equal attribute values.inthashCode()Computes a hash code from attributes:id,name.Stringid()Stringname()StringtoString()Prints the immutable valueNameIdDtowith attribute values.ImmutableNameIdDtowithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableNameIdDtowithName(String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
id
public String id()
- Specified by:
idin interfaceParentsStepDto.NameIdDto- Returns:
- The value of the
idattribute
-
name
public String name()
- Specified by:
namein interfaceParentsStepDto.NameIdDto- Returns:
- The value of the
nameattribute
-
withId
public final ImmutableNameIdDto withId(String value)
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
public final ImmutableNameIdDto withName(String value)
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
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueNameIdDtowith attribute values.
-
copyOf
public static ImmutableNameIdDto copyOf(ParentsStepDto.NameIdDto instance)
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
public static ImmutableNameIdDto.Builder builder()
Creates a builder forImmutableNameIdDto.ImmutableNameIdDto.builder() .id(String) // requiredid.name(String) // requiredname.build();- Returns:
- A new ImmutableNameIdDto builder
-
-