Package io.dialob.api.form
Class ImmutableFormValueSet.Builder
java.lang.Object
io.dialob.api.form.ImmutableFormValueSet.Builder
- Enclosing class:
- ImmutableFormValueSet
Builds instances of type
ImmutableFormValueSet.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllEntries(Iterable<? extends FormValueSetEntry> elements) Adds elements toentrieslist.addEntries(FormValueSetEntry element) Adds one element toentrieslist.addEntries(FormValueSetEntry... elements) Adds elements toentrieslist.additionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap.build()Builds a newImmutableFormValueSet.entries(Iterable<? extends FormValueSetEntry> elements) Sets or replaces all elements forentrieslist.from(FormValueSet instance) Fill a builder with attribute values from the providedFormValueSetinstance.from(ModifiableFormValueSet instance) Fill a builder with attribute values from the providedModifiableFormValueSetinstance.Initializes the value for theidattribute.putAdditionalProperties(String key, Object value) Put one entry to theadditionalPropertiesmap.putAdditionalProperties(Map.Entry<String, ? extends Object> entry) Put one entry to theadditionalPropertiesmap.putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toadditionalPropertiesmap.
-
Method Details
-
from
Fill a builder with attribute values from the providedModifiableFormValueSetinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedFormValueSetinstance. 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
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addEntries
Adds one element toentrieslist.- Parameters:
element- A entries element- Returns:
thisbuilder for use in a chained invocation
-
addEntries
Adds elements toentrieslist.- Parameters:
elements- An array of entries elements- Returns:
thisbuilder for use in a chained invocation
-
entries
Sets or replaces all elements forentrieslist.- Parameters:
elements- An iterable of entries elements- Returns:
thisbuilder for use in a chained invocation
-
addAllEntries
public final ImmutableFormValueSet.Builder addAllEntries(Iterable<? extends FormValueSetEntry> elements) Adds elements toentrieslist.- Parameters:
elements- An iterable of entries elements- Returns:
thisbuilder for use in a chained invocation
-
putAdditionalProperties
public final ImmutableFormValueSet.Builder putAdditionalProperties(@Nullable String key, @Nullable Object value) Put one entry to theadditionalPropertiesmap.- Parameters:
key- The key in the additionalProperties mapvalue- The associated value in the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAdditionalProperties
public final ImmutableFormValueSet.Builder putAdditionalProperties(Map.Entry<String, ? extends Object> entry) Put one entry to theadditionalPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
additionalProperties
public final ImmutableFormValueSet.Builder additionalProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for theadditionalPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllAdditionalProperties
public final ImmutableFormValueSet.Builder putAllAdditionalProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries toadditionalPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the additionalProperties map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFormValueSet.- Returns:
- An immutable instance of FormValueSet
- Throws:
IllegalStateException- if any required attributes are missing
-