Class ModifiableFormValueSet

java.lang.Object
io.dialob.api.form.ModifiableFormValueSet
All Implemented Interfaces:
FormValueSet, Serializable

@ParametersAreNonnullByDefault @Generated({"Modifiables.generator","FormValueSet"}) @NotThreadSafe public final class ModifiableFormValueSet extends Object implements FormValueSet
A modifiable implementation of the FormValueSet type.

Use the create() static factory methods to create new instances. Use the toImmutable() method to convert to canonical immutable instances.

ModifiableFormValueSet is not thread-safe

See Also:
  • Method Details

    • create

      public static ModifiableFormValueSet create()
      Construct a modifiable instance of FormValueSet.
      Returns:
      A new modifiable instance
    • getId

      public final String getId()
      Specified by:
      getId in interface FormValueSet
      Returns:
      value of id attribute, may be null
    • getEntries

      public final List<FormValueSetEntry> getEntries()
      Specified by:
      getEntries in interface FormValueSet
      Returns:
      modifiable list entries
    • getAdditionalProperties

      public final Map<String,Object> getAdditionalProperties()
      Specified by:
      getAdditionalProperties in interface FormValueSet
      Returns:
      value of additionalProperties attribute
    • clear

      public ModifiableFormValueSet clear()
      Clears the object by setting all attributes to their initial values.
      Returns:
      this for use in a chained invocation
    • from

      public ModifiableFormValueSet from(FormValueSet instance)
      Fill this modifiable instance with attribute values from the provided FormValueSet instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • from

      Fill this modifiable instance with attribute values from the provided FormValueSet instance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values). Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this for use in a chained invocation
    • setId

      public ModifiableFormValueSet setId(String id)
      Assigns a value to the id attribute.
      Parameters:
      id - The value for id, can be null
      Returns:
      this for use in a chained invocation
    • addEntries

      public ModifiableFormValueSet addEntries(FormValueSetEntry element)
      Adds one element to entries list.
      Parameters:
      element - The entries element
      Returns:
      this for use in a chained invocation
    • addEntries

      public final ModifiableFormValueSet addEntries(FormValueSetEntry... elements)
      Adds elements to entries list.
      Parameters:
      elements - An array of entries elements
      Returns:
      this for use in a chained invocation
    • setEntries

      public ModifiableFormValueSet setEntries(Iterable<? extends FormValueSetEntry> elements)
      Sets or replaces all elements for entries list.
      Parameters:
      elements - An iterable of entries elements
      Returns:
      this for use in a chained invocation
    • addAllEntries

      public ModifiableFormValueSet addAllEntries(Iterable<? extends FormValueSetEntry> elements)
      Adds elements to entries list.
      Parameters:
      elements - An iterable of entries elements
      Returns:
      this for use in a chained invocation
    • putAdditionalProperties

      public ModifiableFormValueSet putAdditionalProperties(String key, Object value)
      Put one entry to the additionalProperties map.
      Parameters:
      key - The key in additionalProperties map
      value - The associated value in the additionalProperties map
      Returns:
      this for use in a chained invocation
    • setAdditionalProperties

      public ModifiableFormValueSet setAdditionalProperties(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the additionalProperties map. Nulls are not permitted as keys or values.
      Parameters:
      entries - The entries that will be added to the additionalProperties map
      Returns:
      this for use in a chained invocation
    • putAllAdditionalProperties

      public ModifiableFormValueSet putAllAdditionalProperties(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to the additionalProperties map. Nulls are not permitted as keys or values.
      Parameters:
      entries - to be added to additionalProperties map
      Returns:
      this for use in a chained invocation
    • isInitialized

      public final boolean isInitialized()
      Returns true if all required attributes are set, indicating that the object is initialized.
      Returns:
      true if set
    • toImmutable

      public final ImmutableFormValueSet toImmutable()
      Returns:
      An immutable instance of FormValueSet
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ModifiableFormValueSet that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: id, entries, additionalProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Generates a string representation of this FormValueSet. If uninitialized, some attribute values may appear as question marks.
      Overrides:
      toString in class Object
      Returns:
      A string representation