Package io.dialob.client.api
Class ImmutableComposerState.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableComposerState.Builder
-
- Enclosing class:
- ImmutableComposerState
@NotThreadSafe public static final class ImmutableComposerState.Builder extends Object
Builds instances of typeImmutableComposerState. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableComposerState.Builder from(DialobComposer.ComposerState instance)
Fill a builder with attribute values from the providedComposerStateinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putForms
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putForms(String key, DialobDocument.FormDocument value)
Put one entry to theformsmap.- Parameters:
key- The key in the forms mapvalue- The associated value in the forms map- Returns:
thisbuilder for use in a chained invocation
-
putForms
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putForms(Map.Entry<String,? extends DialobDocument.FormDocument> entry)
Put one entry to theformsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
forms
@CanIgnoreReturnValue public final ImmutableComposerState.Builder forms(Map<String,? extends DialobDocument.FormDocument> entries)
Sets or replaces all mappings from the specified map as entries for theformsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the forms map- Returns:
thisbuilder for use in a chained invocation
-
putAllForms
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putAllForms(Map<String,? extends DialobDocument.FormDocument> entries)
Put all mappings from the specified map as entries toformsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the forms map- Returns:
thisbuilder for use in a chained invocation
-
putRevs
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putRevs(String key, DialobDocument.FormRevisionDocument value)
Put one entry to therevsmap.- Parameters:
key- The key in the revs mapvalue- The associated value in the revs map- Returns:
thisbuilder for use in a chained invocation
-
putRevs
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putRevs(Map.Entry<String,? extends DialobDocument.FormRevisionDocument> entry)
Put one entry to therevsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
revs
@CanIgnoreReturnValue public final ImmutableComposerState.Builder revs(Map<String,? extends DialobDocument.FormRevisionDocument> entries)
Sets or replaces all mappings from the specified map as entries for therevsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the revs map- Returns:
thisbuilder for use in a chained invocation
-
putAllRevs
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putAllRevs(Map<String,? extends DialobDocument.FormRevisionDocument> entries)
Put all mappings from the specified map as entries torevsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the revs map- Returns:
thisbuilder for use in a chained invocation
-
putReleases
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putReleases(String key, DialobDocument.FormReleaseDocument value)
Put one entry to thereleasesmap.- Parameters:
key- The key in the releases mapvalue- The associated value in the releases map- Returns:
thisbuilder for use in a chained invocation
-
putReleases
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putReleases(Map.Entry<String,? extends DialobDocument.FormReleaseDocument> entry)
Put one entry to thereleasesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
releases
@CanIgnoreReturnValue public final ImmutableComposerState.Builder releases(Map<String,? extends DialobDocument.FormReleaseDocument> entries)
Sets or replaces all mappings from the specified map as entries for thereleasesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the releases map- Returns:
thisbuilder for use in a chained invocation
-
putAllReleases
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putAllReleases(Map<String,? extends DialobDocument.FormReleaseDocument> entries)
Put all mappings from the specified map as entries toreleasesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the releases map- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableComposerState build()
Builds a newImmutableComposerState.- Returns:
- An immutable instance of ComposerState
- Throws:
IllegalStateException- if any required attributes are missing
-
-