Package io.dialob.client.api
Class ImmutableCopyAs
- java.lang.Object
-
- io.dialob.client.api.ImmutableCopyAs
-
- All Implemented Interfaces:
DialobComposer.CopyAs,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCopyAs extends Object implements DialobComposer.CopyAs
Immutable implementation ofDialobComposer.CopyAs.Use the builder to create immutable instances:
ImmutableCopyAs.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCopyAs.BuilderBuilds instances of typeImmutableCopyAs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCopyAs.Builderbuilder()Creates a builder forImmutableCopyAs.static ImmutableCopyAscopyOf(DialobComposer.CopyAs instance)Creates an immutable copy of aDialobComposer.CopyAsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCopyAsthat have equal attribute values.StringgetId()StringgetName()inthashCode()Computes a hash code from attributes:id,name.StringtoString()Prints the immutable valueCopyAswith attribute values.ImmutableCopyAswithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableCopyAswithName(String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceDialobComposer.CopyAs- Returns:
- The value of the
idattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceDialobComposer.CopyAs- Returns:
- The value of the
nameattribute
-
withId
public final ImmutableCopyAs 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 ImmutableCopyAs 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 ofImmutableCopyAsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,name.
-
toString
public String toString()
Prints the immutable valueCopyAswith attribute values.
-
copyOf
public static ImmutableCopyAs copyOf(DialobComposer.CopyAs instance)
Creates an immutable copy of aDialobComposer.CopyAsvalue. 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 CopyAs instance
-
builder
public static ImmutableCopyAs.Builder builder()
Creates a builder forImmutableCopyAs.ImmutableCopyAs.builder() .id(String) // requiredid.name(String) // requiredname.build();- Returns:
- A new ImmutableCopyAs builder
-
-