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,DialobDocument.FormDocument>getForms()com.google.common.collect.ImmutableMap<String,DialobDocument.FormReleaseDocument>getReleases()com.google.common.collect.ImmutableMap<String,DialobDocument.FormRevisionDocument>getRevs()inthashCode()Computes a hash code from attributes:forms,revs,releases.StringtoString()Prints the immutable valueComposerStatewith attribute values.ImmutableComposerStatewithForms(Map<String,? extends DialobDocument.FormDocument> entries)Copy the current immutable object by replacing theformsmap with the specified map.ImmutableComposerStatewithReleases(Map<String,? extends DialobDocument.FormReleaseDocument> entries)Copy the current immutable object by replacing thereleasesmap with the specified map.ImmutableComposerStatewithRevs(Map<String,? extends DialobDocument.FormRevisionDocument> entries)Copy the current immutable object by replacing therevsmap with the specified map.
-
-
-
Method Detail
-
getForms
public com.google.common.collect.ImmutableMap<String,DialobDocument.FormDocument> getForms()
- Specified by:
getFormsin interfaceDialobComposer.ComposerState- Returns:
- The value of the
formsattribute
-
getRevs
public com.google.common.collect.ImmutableMap<String,DialobDocument.FormRevisionDocument> getRevs()
- Specified by:
getRevsin interfaceDialobComposer.ComposerState- Returns:
- The value of the
revsattribute
-
getReleases
public com.google.common.collect.ImmutableMap<String,DialobDocument.FormReleaseDocument> getReleases()
- Specified by:
getReleasesin interfaceDialobComposer.ComposerState- Returns:
- The value of the
releasesattribute
-
withForms
public final ImmutableComposerState withForms(Map<String,? extends DialobDocument.FormDocument> 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
-
withRevs
public final ImmutableComposerState withRevs(Map<String,? extends DialobDocument.FormRevisionDocument> entries)
Copy the current immutable object by replacing therevsmap 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 revs map- Returns:
- A modified copy of
thisobject
-
withReleases
public final ImmutableComposerState withReleases(Map<String,? extends DialobDocument.FormReleaseDocument> entries)
Copy the current immutable object by replacing thereleasesmap 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 releases 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:forms,revs,releases.
-
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() .putForms|putAllForms(String => io.dialob.client.api.DialobDocument.FormDocument) //formsmappings .putRevs|putAllRevs(String => io.dialob.client.api.DialobDocument.FormRevisionDocument) //revsmappings .putReleases|putAllReleases(String => io.dialob.client.api.DialobDocument.FormReleaseDocument) //releasesmappings .build();- Returns:
- A new ImmutableComposerState builder
-
-