Class ImmutableFormValueSetEntry

java.lang.Object
io.dialob.api.form.ImmutableFormValueSetEntry
All Implemented Interfaces:
FormValueSetEntry, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableFormValueSetEntry extends Object implements FormValueSetEntry
Immutable implementation of FormValueSetEntry.

Use the builder to create immutable instances: ImmutableFormValueSetEntry.builder().

See Also:
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface FormValueSetEntry
      Returns:
      The value of the id attribute
    • getLabel

      public Map<String,String> getLabel()
      Specified by:
      getLabel in interface FormValueSetEntry
      Returns:
      The value of the label attribute
    • getWhen

      public String getWhen()
      Specified by:
      getWhen in interface FormValueSetEntry
      Returns:
      The value of the when attribute
    • getAdditionalProperties

      public Map<String,Object> getAdditionalProperties()
      Specified by:
      getAdditionalProperties in interface FormValueSetEntry
      Returns:
      The value of the additionalProperties attribute
    • withId

      public final ImmutableFormValueSetEntry withId(String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy of the this object
    • withLabel

      public final ImmutableFormValueSetEntry withLabel(Map<String,? extends String> entries)
      Copy the current immutable object by replacing the label map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the label map
      Returns:
      A modified copy of this object
    • withWhen

      public final ImmutableFormValueSetEntry withWhen(String value)
      Copy the current immutable object by setting a value for the when attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for when (can be null)
      Returns:
      A modified copy of the this object
    • withAdditionalProperties

      public final ImmutableFormValueSetEntry withAdditionalProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the additionalProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the additionalProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableFormValueSetEntry 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, label, when, additionalProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value FormValueSetEntry with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableFormValueSetEntry copyOf(FormValueSetEntry instance)
      Creates an immutable copy of a FormValueSetEntry value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable FormValueSetEntry instance
    • builder

      public static ImmutableFormValueSetEntry.Builder builder()
      Creates a builder for ImmutableFormValueSetEntry.
       ImmutableFormValueSetEntry.builder()
          .id(String) // required id
          .putLabel|putAllLabel(String => String) // label mappings
          .when(String | null) // nullable when
          .putAdditionalProperties|putAllAdditionalProperties(String => Object) // additionalProperties mappings
          .build();
       
      Returns:
      A new ImmutableFormValueSetEntry builder