Package io.dialob.client.api
Class ImmutableComposerState
- java.lang.Object
-
- io.dialob.client.api.ImmutableComposerState
-
- All Implemented Interfaces:
DialobComposer.ComposerState,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableComposerState extends Object implements DialobComposer.ComposerState
Immutable implementation ofDialobComposer.ComposerState.Use the builder to create immutable instances:
ImmutableComposerState.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableComposerState.BuilderBuilds instances of typeImmutableComposerState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableComposerState.Builderbuilder()Creates a builder forImmutableComposerState.static ImmutableComposerStatecopyOf(DialobComposer.ComposerState instance)Creates an immutable copy of aDialobComposer.ComposerStatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableComposerStatethat have equal attribute values.com.google.common.collect.ImmutableMap<String,DialobComposer.ComposerEntity<DialobComposer.FormAndTags>>getForms()com.google.common.collect.ImmutableMap<String,DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>>getTags()inthashCode()Computes a hash code from attributes:tags,forms.StringtoString()Prints the immutable valueComposerStatewith attribute values.ImmutableComposerStatewithForms(Map<String,? extends DialobComposer.ComposerEntity<DialobComposer.FormAndTags>> entries)Copy the current immutable object by replacing theformsmap with the specified map.ImmutableComposerStatewithTags(Map<String,? extends DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>> entries)Copy the current immutable object by replacing thetagsmap with the specified map.
-
-
-
Method Detail
-
getTags
public com.google.common.collect.ImmutableMap<String,DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>> getTags()
- Specified by:
getTagsin interfaceDialobComposer.ComposerState- Returns:
- The value of the
tagsattribute
-
getForms
public com.google.common.collect.ImmutableMap<String,DialobComposer.ComposerEntity<DialobComposer.FormAndTags>> getForms()
- Specified by:
getFormsin interfaceDialobComposer.ComposerState- Returns:
- The value of the
formsattribute
-
withTags
public final ImmutableComposerState withTags(Map<String,? extends DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>> entries)
Copy the current immutable object by replacing thetagsmap 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 tags map- Returns:
- A modified copy of
thisobject
-
withForms
public final ImmutableComposerState withForms(Map<String,? extends DialobComposer.ComposerEntity<DialobComposer.FormAndTags>> entries)
Copy the current immutable object by replacing theformsmap 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 forms map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableComposerStatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:tags,forms.
-
toString
public String toString()
Prints the immutable valueComposerStatewith attribute values.
-
copyOf
public static ImmutableComposerState copyOf(DialobComposer.ComposerState instance)
Creates an immutable copy of aDialobComposer.ComposerStatevalue. 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 ComposerState instance
-
builder
public static ImmutableComposerState.Builder builder()
Creates a builder forImmutableComposerState.ImmutableComposerState.builder() .putTags|putAllTags(String => io.dialob.client.api.DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>) //tagsmappings .putForms|putAllForms(String => io.dialob.client.api.DialobComposer.ComposerEntity<io.dialob.client.api.DialobComposer.FormAndTags>) //formsmappings .build();- Returns:
- A new ImmutableComposerState builder
-
-