Package io.dialob.client.api
Class ImmutableFormAndTags.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableFormAndTags.Builder
-
- Enclosing class:
- ImmutableFormAndTags
@NotThreadSafe public static final class ImmutableFormAndTags.Builder extends Object
Builds instances of typeImmutableFormAndTags. 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableFormAndTags.BuilderaddAllTags(Iterable<? extends io.dialob.api.form.FormTag> elements)Adds elements totagslist.ImmutableFormAndTags.BuilderaddTags(io.dialob.api.form.FormTag element)Adds one element totagslist.ImmutableFormAndTags.BuilderaddTags(io.dialob.api.form.FormTag... elements)Adds elements totagslist.ImmutableFormAndTagsbuild()Builds a newImmutableFormAndTags.ImmutableFormAndTags.Builderform(io.dialob.api.form.Form form)Initializes the value for theformattribute.ImmutableFormAndTags.Builderfrom(DialobComposer.FormAndTags instance)Fill a builder with attribute values from the providedFormAndTagsinstance.ImmutableFormAndTags.Buildertags(Iterable<? extends io.dialob.api.form.FormTag> elements)Sets or replaces all elements fortagslist.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFormAndTags.Builder from(DialobComposer.FormAndTags instance)
Fill a builder with attribute values from the providedFormAndTagsinstance. 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
-
form
@CanIgnoreReturnValue public final ImmutableFormAndTags.Builder form(io.dialob.api.form.Form form)
Initializes the value for theformattribute.- Parameters:
form- The value for form- Returns:
thisbuilder for use in a chained invocation
-
addTags
@CanIgnoreReturnValue public final ImmutableFormAndTags.Builder addTags(io.dialob.api.form.FormTag element)
Adds one element totagslist.- Parameters:
element- A tags element- Returns:
thisbuilder for use in a chained invocation
-
addTags
@CanIgnoreReturnValue public final ImmutableFormAndTags.Builder addTags(io.dialob.api.form.FormTag... elements)
Adds elements totagslist.- Parameters:
elements- An array of tags elements- Returns:
thisbuilder for use in a chained invocation
-
tags
@CanIgnoreReturnValue public final ImmutableFormAndTags.Builder tags(Iterable<? extends io.dialob.api.form.FormTag> elements)
Sets or replaces all elements fortagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
addAllTags
@CanIgnoreReturnValue public final ImmutableFormAndTags.Builder addAllTags(Iterable<? extends io.dialob.api.form.FormTag> elements)
Adds elements totagslist.- Parameters:
elements- An iterable of tags elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableFormAndTags build()
Builds a newImmutableFormAndTags.- Returns:
- An immutable instance of FormAndTags
- Throws:
IllegalStateException- if any required attributes are missing
-
-