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
-
putTags
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putTags(String key, DialobComposer.ComposerEntity<io.dialob.api.form.FormTag> value)
Put one entry to thetagsmap.- Parameters:
key- The key in the tags mapvalue- The associated value in the tags map- Returns:
thisbuilder for use in a chained invocation
-
putTags
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putTags(Map.Entry<String,? extends DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>> entry)
Put one entry to thetagsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
tags
@CanIgnoreReturnValue public final ImmutableComposerState.Builder tags(Map<String,? extends DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>> entries)
Sets or replaces all mappings from the specified map as entries for thetagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
putAllTags
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putAllTags(Map<String,? extends DialobComposer.ComposerEntity<io.dialob.api.form.FormTag>> entries)
Put all mappings from the specified map as entries totagsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the tags map- Returns:
thisbuilder for use in a chained invocation
-
putForms
@CanIgnoreReturnValue public final ImmutableComposerState.Builder putForms(String key, DialobComposer.ComposerEntity<DialobComposer.FormAndTags> 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 DialobComposer.ComposerEntity<DialobComposer.FormAndTags>> 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 DialobComposer.ComposerEntity<DialobComposer.FormAndTags>> 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 DialobComposer.ComposerEntity<DialobComposer.FormAndTags>> 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
-
build
public ImmutableComposerState build()
Builds a newImmutableComposerState.- Returns:
- An immutable instance of ComposerState
- Throws:
IllegalStateException- if any required attributes are missing
-
-