Package io.dialob.api.form
Class ImmutableFormItem
- java.lang.Object
-
- io.dialob.api.form.ImmutableFormItem
-
- All Implemented Interfaces:
FormItem,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableFormItem extends Object implements FormItem
Immutable implementation ofFormItem.Use the builder to create immutable instances:
ImmutableFormItem.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableFormItem.BuilderBuilds instances of typeImmutableFormItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableFormItem.Builderbuilder()Creates a builder forImmutableFormItem.static ImmutableFormItemcopyOf(FormItem instance)Creates an immutable copy of aFormItemvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableFormItemthat have equal attribute values.StringgetActiveWhen()Map<String,Object>getAdditionalProperties()StringgetCanAddRowWhen()StringgetCanRemoveRowWhen()List<String>getClassName()ObjectgetDefaultValue()Map<String,String>getDescription()StringgetId()List<String>getItems()Map<String,String>getLabel()Map<String,Object>getProps()BooleangetReadOnly()StringgetRequired()Map<String,String>getRequiredErrorText()StringgetType()List<Validation>getValidations()StringgetValueSetId()StringgetView()inthashCode()Computes a hash code from attributes:id,type,view,label,description,required,requiredErrorText,readOnly,items,className,activeWhen,canAddRowWhen,canRemoveRowWhen,validations,valueSetId,defaultValue,props,additionalProperties.StringtoString()Prints the immutable valueFormItemwith attribute values.ImmutableFormItemwithActiveWhen(String value)Copy the current immutable object by setting a value for theactiveWhenattribute.ImmutableFormItemwithAdditionalProperties(Map<String,? extends Object> entries)Copy the current immutable object by replacing theadditionalPropertiesmap with the specified map.ImmutableFormItemwithCanAddRowWhen(String value)Copy the current immutable object by setting a value for thecanAddRowWhenattribute.ImmutableFormItemwithCanRemoveRowWhen(String value)Copy the current immutable object by setting a value for thecanRemoveRowWhenattribute.ImmutableFormItemwithClassName(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofclassName.ImmutableFormItemwithClassName(String... elements)Copy the current immutable object with elements that replace the content ofclassName.ImmutableFormItemwithDefaultValue(Object value)Copy the current immutable object by setting a value for thedefaultValueattribute.ImmutableFormItemwithDescription(Map<String,? extends String> entries)Copy the current immutable object by replacing thedescriptionmap with the specified map.ImmutableFormItemwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableFormItemwithItems(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableFormItemwithItems(String... elements)Copy the current immutable object with elements that replace the content ofitems.ImmutableFormItemwithLabel(Map<String,? extends String> entries)Copy the current immutable object by replacing thelabelmap with the specified map.ImmutableFormItemwithProps(Map<String,? extends Object> entries)Copy the current immutable object by replacing thepropsmap with the specified map.ImmutableFormItemwithReadOnly(Boolean value)Copy the current immutable object by setting a value for thereadOnlyattribute.ImmutableFormItemwithRequired(String value)Copy the current immutable object by setting a value for therequiredattribute.ImmutableFormItemwithRequiredErrorText(Map<String,? extends String> entries)Copy the current immutable object by replacing therequiredErrorTextmap with the specified map.ImmutableFormItemwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableFormItemwithValidations(Validation... elements)Copy the current immutable object with elements that replace the content ofvalidations.ImmutableFormItemwithValidations(Iterable<? extends Validation> elements)Copy the current immutable object with elements that replace the content ofvalidations.ImmutableFormItemwithValueSetId(String value)Copy the current immutable object by setting a value for thevalueSetIdattribute.ImmutableFormItemwithView(String value)Copy the current immutable object by setting a value for theviewattribute.
-
-
-
Method Detail
-
getId
public String getId()
-
getType
public String getType()
-
getView
public String getView()
-
getDescription
public Map<String,String> getDescription()
- Specified by:
getDescriptionin interfaceFormItem- Returns:
- The value of the
descriptionattribute
-
getRequired
public String getRequired()
- Specified by:
getRequiredin interfaceFormItem- Returns:
- The value of the
requiredattribute
-
getRequiredErrorText
public Map<String,String> getRequiredErrorText()
- Specified by:
getRequiredErrorTextin interfaceFormItem- Returns:
- The value of the
requiredErrorTextattribute
-
getReadOnly
public Boolean getReadOnly()
- Specified by:
getReadOnlyin interfaceFormItem- Returns:
- The value of the
readOnlyattribute
-
getClassName
public List<String> getClassName()
- Specified by:
getClassNamein interfaceFormItem- Returns:
- The value of the
classNameattribute
-
getActiveWhen
public String getActiveWhen()
- Specified by:
getActiveWhenin interfaceFormItem- Returns:
- The value of the
activeWhenattribute
-
getCanAddRowWhen
public String getCanAddRowWhen()
- Specified by:
getCanAddRowWhenin interfaceFormItem- Returns:
- The value of the
canAddRowWhenattribute
-
getCanRemoveRowWhen
public String getCanRemoveRowWhen()
- Specified by:
getCanRemoveRowWhenin interfaceFormItem- Returns:
- The value of the
canRemoveRowWhenattribute
-
getValidations
public List<Validation> getValidations()
- Specified by:
getValidationsin interfaceFormItem- Returns:
- The value of the
validationsattribute
-
getValueSetId
public String getValueSetId()
- Specified by:
getValueSetIdin interfaceFormItem- Returns:
- The value of the
valueSetIdattribute
-
getDefaultValue
public Object getDefaultValue()
- Specified by:
getDefaultValuein interfaceFormItem- Returns:
- The value of the
defaultValueattribute
-
getAdditionalProperties
public Map<String,Object> getAdditionalProperties()
- Specified by:
getAdditionalPropertiesin interfaceFormItem- Returns:
- The value of the
additionalPropertiesattribute
-
withId
public final ImmutableFormItem withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableFormItem withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withView
public final ImmutableFormItem withView(String value)
Copy the current immutable object by setting a value for theviewattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for view (can benull)- Returns:
- A modified copy of the
thisobject
-
withLabel
public final ImmutableFormItem withLabel(Map<String,? extends String> entries)
Copy the current immutable object by replacing thelabelmap 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 returningthis.- Parameters:
entries- The entries to be added to the label map- Returns:
- A modified copy of
thisobject
-
withDescription
public final ImmutableFormItem withDescription(Map<String,? extends String> entries)
Copy the current immutable object by replacing thedescriptionmap 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 returningthis.- Parameters:
entries- The entries to be added to the description map- Returns:
- A modified copy of
thisobject
-
withRequired
public final ImmutableFormItem withRequired(String value)
Copy the current immutable object by setting a value for therequiredattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for required (can benull)- Returns:
- A modified copy of the
thisobject
-
withRequiredErrorText
public final ImmutableFormItem withRequiredErrorText(Map<String,? extends String> entries)
Copy the current immutable object by replacing therequiredErrorTextmap 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 returningthis.- Parameters:
entries- The entries to be added to the requiredErrorText map- Returns:
- A modified copy of
thisobject
-
withReadOnly
public final ImmutableFormItem withReadOnly(Boolean value)
Copy the current immutable object by setting a value for thereadOnlyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for readOnly (can benull)- Returns:
- A modified copy of the
thisobject
-
withItems
public final ImmutableFormItem withItems(String... elements)
Copy the current immutable object with elements that replace the content ofitems.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withItems
public final ImmutableFormItem withItems(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofitems. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of items elements to set- Returns:
- A modified copy of
thisobject
-
withClassName
public final ImmutableFormItem withClassName(String... elements)
Copy the current immutable object with elements that replace the content ofclassName.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withClassName
public final ImmutableFormItem withClassName(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofclassName. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of className elements to set- Returns:
- A modified copy of
thisobject
-
withActiveWhen
public final ImmutableFormItem withActiveWhen(String value)
Copy the current immutable object by setting a value for theactiveWhenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for activeWhen (can benull)- Returns:
- A modified copy of the
thisobject
-
withCanAddRowWhen
public final ImmutableFormItem withCanAddRowWhen(String value)
Copy the current immutable object by setting a value for thecanAddRowWhenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for canAddRowWhen (can benull)- Returns:
- A modified copy of the
thisobject
-
withCanRemoveRowWhen
public final ImmutableFormItem withCanRemoveRowWhen(String value)
Copy the current immutable object by setting a value for thecanRemoveRowWhenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for canRemoveRowWhen (can benull)- Returns:
- A modified copy of the
thisobject
-
withValidations
public final ImmutableFormItem withValidations(Validation... elements)
Copy the current immutable object with elements that replace the content ofvalidations.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withValidations
public final ImmutableFormItem withValidations(Iterable<? extends Validation> elements)
Copy the current immutable object with elements that replace the content ofvalidations. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of validations elements to set- Returns:
- A modified copy of
thisobject
-
withValueSetId
public final ImmutableFormItem withValueSetId(String value)
Copy the current immutable object by setting a value for thevalueSetIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for valueSetId (can benull)- Returns:
- A modified copy of the
thisobject
-
withDefaultValue
public final ImmutableFormItem withDefaultValue(Object value)
Copy the current immutable object by setting a value for thedefaultValueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for defaultValue (can benull)- Returns:
- A modified copy of the
thisobject
-
withProps
public final ImmutableFormItem withProps(Map<String,? extends Object> entries)
Copy the current immutable object by replacing thepropsmap 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 returningthis.- Parameters:
entries- The entries to be added to the props map- Returns:
- A modified copy of
thisobject
-
withAdditionalProperties
public final ImmutableFormItem withAdditionalProperties(Map<String,? extends Object> entries)
Copy the current immutable object by replacing theadditionalPropertiesmap 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 returningthis.- Parameters:
entries- The entries to be added to the additionalProperties map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableFormItemthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,type,view,label,description,required,requiredErrorText,readOnly,items,className,activeWhen,canAddRowWhen,canRemoveRowWhen,validations,valueSetId,defaultValue,props,additionalProperties.
-
toString
public String toString()
Prints the immutable valueFormItemwith attribute values.
-
copyOf
public static ImmutableFormItem copyOf(FormItem instance)
Creates an immutable copy of aFormItemvalue. 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 FormItem instance
-
builder
public static ImmutableFormItem.Builder builder()
Creates a builder forImmutableFormItem.ImmutableFormItem.builder() .id(String | null) // nullableid.type(String | null) // nullabletype.view(String | null) // nullableview.putLabel|putAllLabel(String => String) //labelmappings .putDescription|putAllDescription(String => String) //descriptionmappings .required(String | null) // nullablerequired.putRequiredErrorText|putAllRequiredErrorText(String => String) //requiredErrorTextmappings .readOnly(Boolean | null) // nullablereadOnly.addItems|addAllItems(String) //itemselements .addClassName|addAllClassName(String) //classNameelements .activeWhen(String | null) // nullableactiveWhen.canAddRowWhen(String | null) // nullablecanAddRowWhen.canRemoveRowWhen(String | null) // nullablecanRemoveRowWhen.addValidations|addAllValidations(io.dialob.api.form.Validation) //validationselements .valueSetId(String | null) // nullablevalueSetId.defaultValue(Object | null) // nullabledefaultValue.props(Map<String, Object> | null) // nullableprops.putAdditionalProperties|putAllAdditionalProperties(String => Object) //additionalPropertiesmappings .build();- Returns:
- A new ImmutableFormItem builder
-
-