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 of
FormItem.
Use the builder to create immutable instances:
ImmutableFormItem.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableFormItem.Builderbuilder()Creates a builder forImmutableFormItem.static ImmutableFormItemCreates an immutable copy of aFormItemvalue.booleanThis instance is equal to all instances ofImmutableFormItemthat have equal attribute values.getId()getItems()getLabel()getProps()getType()getView()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.toString()Prints the immutable valueFormItemwith attribute values.final ImmutableFormItemwithActiveWhen(String value) Copy the current immutable object by setting a value for theactiveWhenattribute.final ImmutableFormItemwithAdditionalProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing theadditionalPropertiesmap with the specified map.final ImmutableFormItemwithCanAddRowWhen(String value) Copy the current immutable object by setting a value for thecanAddRowWhenattribute.final ImmutableFormItemwithCanRemoveRowWhen(String value) Copy the current immutable object by setting a value for thecanRemoveRowWhenattribute.final ImmutableFormItemwithClassName(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofclassName.final ImmutableFormItemwithClassName(String... elements) Copy the current immutable object with elements that replace the content ofclassName.final ImmutableFormItemwithDefaultValue(Object value) Copy the current immutable object by setting a value for thedefaultValueattribute.final ImmutableFormItemwithDescription(Map<String, ? extends String> entries) Copy the current immutable object by replacing thedescriptionmap with the specified map.final ImmutableFormItemCopy the current immutable object by setting a value for theidattribute.final ImmutableFormItemCopy the current immutable object with elements that replace the content ofitems.final ImmutableFormItemCopy the current immutable object with elements that replace the content ofitems.final ImmutableFormItemCopy the current immutable object by replacing thelabelmap with the specified map.final ImmutableFormItemCopy the current immutable object by replacing thepropsmap with the specified map.final ImmutableFormItemwithReadOnly(Boolean value) Copy the current immutable object by setting a value for thereadOnlyattribute.final ImmutableFormItemwithRequired(String value) Copy the current immutable object by setting a value for therequiredattribute.final ImmutableFormItemwithRequiredErrorText(Map<String, ? extends String> entries) Copy the current immutable object by replacing therequiredErrorTextmap with the specified map.final ImmutableFormItemCopy the current immutable object by setting a value for thetypeattribute.final ImmutableFormItemwithValidations(Validation... elements) Copy the current immutable object with elements that replace the content ofvalidations.final ImmutableFormItemwithValidations(Iterable<? extends Validation> elements) Copy the current immutable object with elements that replace the content ofvalidations.final ImmutableFormItemwithValueSetId(String value) Copy the current immutable object by setting a value for thevalueSetIdattribute.final ImmutableFormItemCopy the current immutable object by setting a value for theviewattribute.
-
Method Details
-
getId
-
getType
-
getView
-
getLabel
-
getDescription
- Specified by:
getDescriptionin interfaceFormItem- Returns:
- The value of the
descriptionattribute
-
getRequired
- Specified by:
getRequiredin interfaceFormItem- Returns:
- The value of the
requiredattribute
-
getRequiredErrorText
- Specified by:
getRequiredErrorTextin interfaceFormItem- Returns:
- The value of the
requiredErrorTextattribute
-
getReadOnly
- Specified by:
getReadOnlyin interfaceFormItem- Returns:
- The value of the
readOnlyattribute
-
getItems
-
getClassName
- Specified by:
getClassNamein interfaceFormItem- Returns:
- The value of the
classNameattribute
-
getActiveWhen
- Specified by:
getActiveWhenin interfaceFormItem- Returns:
- The value of the
activeWhenattribute
-
getCanAddRowWhen
- Specified by:
getCanAddRowWhenin interfaceFormItem- Returns:
- The value of the
canAddRowWhenattribute
-
getCanRemoveRowWhen
- Specified by:
getCanRemoveRowWhenin interfaceFormItem- Returns:
- The value of the
canRemoveRowWhenattribute
-
getValidations
- Specified by:
getValidationsin interfaceFormItem- Returns:
- The value of the
validationsattribute
-
getValueSetId
- Specified by:
getValueSetIdin interfaceFormItem- Returns:
- The value of the
valueSetIdattribute
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceFormItem- Returns:
- The value of the
defaultValueattribute
-
getProps
-
getAdditionalProperties
- Specified by:
getAdditionalPropertiesin interfaceFormItem- Returns:
- The value of the
additionalPropertiesattribute
-
withId
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Prints the immutable valueFormItemwith attribute values. -
copyOf
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
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
-