Package io.dialob.api.form
Class ImmutableFormValidationError
java.lang.Object
io.dialob.api.form.ImmutableFormValidationError
- All Implemented Interfaces:
FormValidationError,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableFormValidationError
extends Object
implements FormValidationError
Immutable implementation of
FormValidationError.
Use the builder to create immutable instances:
ImmutableFormValidationError.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFormValidationError.Nested classes/interfaces inherited from interface io.dialob.api.form.FormValidationError
FormValidationError.Level, FormValidationError.Type -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableFormValidationError.static ImmutableFormValidationErrorcopyOf(FormValidationError instance) Creates an immutable copy of aFormValidationErrorvalue.booleanThis instance is equal to all instances ofImmutableFormValidationErrorthat have equal attribute values.getIndex()getLevel()getType()inthashCode()Computes a hash code from attributes:itemId,message,level,type,expression,startIndex,endIndex,index.toString()Prints the immutable valueFormValidationErrorwith attribute values.withEndIndex(int value) Copy the current immutable object by setting a present value for the optionalendIndexattribute.withEndIndex(Optional<Integer> optional) Copy the current immutable object by setting an optional value for theendIndexattribute.withExpression(String value) Copy the current immutable object by setting a present value for the optionalexpressionattribute.withExpression(Optional<String> optional) Copy the current immutable object by setting an optional value for theexpressionattribute.withIndex(int value) Copy the current immutable object by setting a present value for the optionalindexattribute.Copy the current immutable object by setting an optional value for theindexattribute.withItemId(String value) Copy the current immutable object by setting a value for theitemIdattribute.Copy the current immutable object by setting a value for thelevelattribute.withMessage(String value) Copy the current immutable object by setting a value for themessageattribute.withStartIndex(int value) Copy the current immutable object by setting a present value for the optionalstartIndexattribute.withStartIndex(Optional<Integer> optional) Copy the current immutable object by setting an optional value for thestartIndexattribute.withType(FormValidationError.Type value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getItemId
- Specified by:
getItemIdin interfaceFormValidationError- Returns:
- The value of the
itemIdattribute
-
getMessage
- Specified by:
getMessagein interfaceFormValidationError- Returns:
- The value of the
messageattribute
-
getLevel
- Specified by:
getLevelin interfaceFormValidationError- Returns:
- The value of the
levelattribute
-
getType
- Specified by:
getTypein interfaceFormValidationError- Returns:
- The value of the
typeattribute
-
getExpression
- Specified by:
getExpressionin interfaceFormValidationError- Returns:
- The value of the
expressionattribute
-
getStartIndex
- Specified by:
getStartIndexin interfaceFormValidationError- Returns:
- The value of the
startIndexattribute
-
getEndIndex
- Specified by:
getEndIndexin interfaceFormValidationError- Returns:
- The value of the
endIndexattribute
-
getIndex
- Specified by:
getIndexin interfaceFormValidationError- Returns:
- The value of the
indexattribute
-
withItemId
Copy the current immutable object by setting a value for theitemIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for itemId (can benull)- Returns:
- A modified copy of the
thisobject
-
withMessage
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message (can benull)- Returns:
- A modified copy of the
thisobject
-
withLevel
Copy the current immutable object by setting a value for thelevelattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for level- Returns:
- A modified copy of the
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is 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
-
withExpression
Copy the current immutable object by setting a present value for the optionalexpressionattribute.- Parameters:
value- The value for expression- Returns:
- A modified copy of
thisobject
-
withExpression
Copy the current immutable object by setting an optional value for theexpressionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for expression- Returns:
- A modified copy of
thisobject
-
withStartIndex
Copy the current immutable object by setting a present value for the optionalstartIndexattribute.- Parameters:
value- The value for startIndex- Returns:
- A modified copy of
thisobject
-
withStartIndex
Copy the current immutable object by setting an optional value for thestartIndexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for startIndex- Returns:
- A modified copy of
thisobject
-
withEndIndex
Copy the current immutable object by setting a present value for the optionalendIndexattribute.- Parameters:
value- The value for endIndex- Returns:
- A modified copy of
thisobject
-
withEndIndex
Copy the current immutable object by setting an optional value for theendIndexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for endIndex- Returns:
- A modified copy of
thisobject
-
withIndex
Copy the current immutable object by setting a present value for the optionalindexattribute.- Parameters:
value- The value for index- Returns:
- A modified copy of
thisobject
-
withIndex
Copy the current immutable object by setting an optional value for theindexattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for index- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableFormValidationErrorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:itemId,message,level,type,expression,startIndex,endIndex,index. -
toString
Prints the immutable valueFormValidationErrorwith attribute values. -
copyOf
Creates an immutable copy of aFormValidationErrorvalue. 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 FormValidationError instance
-
builder
Creates a builder forImmutableFormValidationError.ImmutableFormValidationError.builder() .itemId(String | null) // nullableitemId.message(String | null) // nullablemessage.level(io.dialob.api.form.FormValidationError.Level) // optionallevel.type(io.dialob.api.form.FormValidationError.Type | null) // nullabletype.expression(String) // optionalexpression.startIndex(Integer) // optionalstartIndex.endIndex(Integer) // optionalendIndex.index(Integer) // optionalindex.build();- Returns:
- A new ImmutableFormValidationError builder
-