Package io.dialob.client.api
Class ImmutableFormCommands.Builder
- java.lang.Object
-
- io.dialob.client.api.ImmutableFormCommands.Builder
-
- Enclosing class:
- ImmutableFormCommands
@NotThreadSafe public static final class ImmutableFormCommands.Builder extends Object
Builds instances of typeImmutableFormCommands. 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 ImmutableFormCommands.BuilderaddAllValues(Iterable<? extends DialobComposer.FormCommand> elements)Adds elements tovalueslist.ImmutableFormCommands.BuilderaddValues(DialobComposer.FormCommand element)Adds one element tovalueslist.ImmutableFormCommands.BuilderaddValues(DialobComposer.FormCommand... elements)Adds elements tovalueslist.ImmutableFormCommandsbuild()Builds a newImmutableFormCommands.ImmutableFormCommands.Builderform(io.dialob.api.form.Form form)Initializes the value for theformattribute.ImmutableFormCommands.Builderfrom(DialobComposer.FormCommands instance)Fill a builder with attribute values from the providedFormCommandsinstance.ImmutableFormCommands.Buildervalues(Iterable<? extends DialobComposer.FormCommand> elements)Sets or replaces all elements forvalueslist.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFormCommands.Builder from(DialobComposer.FormCommands instance)
Fill a builder with attribute values from the providedFormCommandsinstance. 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 ImmutableFormCommands.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
-
addValues
@CanIgnoreReturnValue public final ImmutableFormCommands.Builder addValues(DialobComposer.FormCommand element)
Adds one element tovalueslist.- Parameters:
element- A values element- Returns:
thisbuilder for use in a chained invocation
-
addValues
@CanIgnoreReturnValue public final ImmutableFormCommands.Builder addValues(DialobComposer.FormCommand... elements)
Adds elements tovalueslist.- Parameters:
elements- An array of values elements- Returns:
thisbuilder for use in a chained invocation
-
values
@CanIgnoreReturnValue public final ImmutableFormCommands.Builder values(Iterable<? extends DialobComposer.FormCommand> elements)
Sets or replaces all elements forvalueslist.- Parameters:
elements- An iterable of values elements- Returns:
thisbuilder for use in a chained invocation
-
addAllValues
@CanIgnoreReturnValue public final ImmutableFormCommands.Builder addAllValues(Iterable<? extends DialobComposer.FormCommand> elements)
Adds elements tovalueslist.- Parameters:
elements- An iterable of values elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableFormCommands build()
Builds a newImmutableFormCommands.- Returns:
- An immutable instance of FormCommands
- Throws:
IllegalStateException- if any required attributes are missing
-
-