Package io.dialob.client.api
Class ImmutableFormAndTags
- java.lang.Object
-
- io.dialob.client.api.ImmutableFormAndTags
-
- All Implemented Interfaces:
DialobComposer.FormAndTags,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFormAndTags extends Object implements DialobComposer.FormAndTags
Immutable implementation ofDialobComposer.FormAndTags.Use the builder to create immutable instances:
ImmutableFormAndTags.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableFormAndTags.BuilderBuilds instances of typeImmutableFormAndTags.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFormAndTags.Builderbuilder()Creates a builder forImmutableFormAndTags.static ImmutableFormAndTagscopyOf(DialobComposer.FormAndTags instance)Creates an immutable copy of aDialobComposer.FormAndTagsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableFormAndTagsthat have equal attribute values.io.dialob.api.form.FormgetForm()com.google.common.collect.ImmutableList<io.dialob.api.form.FormTag>getTags()inthashCode()Computes a hash code from attributes:form,tags.StringtoString()Prints the immutable valueFormAndTagswith attribute values.ImmutableFormAndTagswithForm(io.dialob.api.form.Form value)Copy the current immutable object by setting a value for theformattribute.ImmutableFormAndTagswithTags(io.dialob.api.form.FormTag... elements)Copy the current immutable object with elements that replace the content oftags.ImmutableFormAndTagswithTags(Iterable<? extends io.dialob.api.form.FormTag> elements)Copy the current immutable object with elements that replace the content oftags.
-
-
-
Method Detail
-
getForm
public io.dialob.api.form.Form getForm()
- Specified by:
getFormin interfaceDialobComposer.FormAndTags- Returns:
- The value of the
formattribute
-
getTags
public com.google.common.collect.ImmutableList<io.dialob.api.form.FormTag> getTags()
- Specified by:
getTagsin interfaceDialobComposer.FormAndTags- Returns:
- The value of the
tagsattribute
-
withForm
public final ImmutableFormAndTags withForm(io.dialob.api.form.Form value)
Copy the current immutable object by setting a value for theformattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for form- Returns:
- A modified copy of the
thisobject
-
withTags
public final ImmutableFormAndTags withTags(io.dialob.api.form.FormTag... elements)
Copy the current immutable object with elements that replace the content oftags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTags
public final ImmutableFormAndTags withTags(Iterable<? extends io.dialob.api.form.FormTag> elements)
Copy the current immutable object with elements that replace the content oftags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of tags elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableFormAndTagsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:form,tags.
-
toString
public String toString()
Prints the immutable valueFormAndTagswith attribute values.
-
copyOf
public static ImmutableFormAndTags copyOf(DialobComposer.FormAndTags instance)
Creates an immutable copy of aDialobComposer.FormAndTagsvalue. 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 FormAndTags instance
-
builder
public static ImmutableFormAndTags.Builder builder()
Creates a builder forImmutableFormAndTags.ImmutableFormAndTags.builder() .form(io.dialob.api.form.Form) // requiredform.addTags|addAllTags(io.dialob.api.form.FormTag) //tagselements .build();- Returns:
- A new ImmutableFormAndTags builder
-
-