Class ImmutableError
java.lang.Object
io.dialob.session.engine.program.model.ImmutableError
- All Implemented Interfaces:
Error,ProgramNode,StructuralNode,Serializable
@Generated(from="Error",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableError
extends Object
implements Error
Immutable implementation of
Error.
Use the builder to create immutable instances:
ImmutableError.builder().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableError.Builderbuilder()Creates a builder forImmutableError.static ImmutableErrorCreates an immutable copy of aErrorvalue.booleanThis instance is equal to all instances ofImmutableErrorthat have equal attribute values.getCode()getLabel()inthashCode()Computes a hash code from attributes:isPrototype,code,itemId,validationExpression,disabledExpression,label.booleantoString()Prints the immutable valueErrorwith attribute values.final ImmutableErrorCopy the current immutable object by setting a value for thecodeattribute.final ImmutableErrorwithDisabledExpression(Expression value) Copy the current immutable object by setting a present value for the optionaldisabledExpressionattribute.final ImmutableErrorwithDisabledExpression(Optional<? extends Expression> optional) Copy the current immutable object by setting an optional value for thedisabledExpressionattribute.final ImmutableErrorwithIsPrototype(boolean value) Copy the current immutable object by setting a value for theisPrototypeattribute.final ImmutableErrorwithItemId(ItemId value) Copy the current immutable object by setting a value for theitemIdattribute.final ImmutableErrorwithLabel(Expression value) Copy the current immutable object by setting a value for thelabelattribute.final ImmutableErrorCopy the current immutable object by setting a value for thevalidationExpressionattribute.
-
Method Details
-
isPrototype
public boolean isPrototype()- Specified by:
isPrototypein interfaceStructuralNode- Returns:
- The value of the
isPrototypeattribute
-
getCode
-
getItemId
-
getValidationExpression
- Specified by:
getValidationExpressionin interfaceError- Returns:
- The value of the
validationExpressionattribute
-
getDisabledExpression
- Specified by:
getDisabledExpressionin interfaceError- Returns:
- The value of the
disabledExpressionattribute
-
getLabel
-
withIsPrototype
Copy the current immutable object by setting a value for theisPrototypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isPrototype- Returns:
- A modified copy or the
thisobject
-
withCode
Copy the current immutable object by setting a value for thecodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for code (can benull)- Returns:
- A modified copy or the
thisobject
-
withItemId
Copy the current immutable object by setting a value for theitemIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for itemId- Returns:
- A modified copy or the
thisobject
-
withValidationExpression
Copy the current immutable object by setting a value for thevalidationExpressionattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for validationExpression- Returns:
- A modified copy or the
thisobject
-
withDisabledExpression
Copy the current immutable object by setting a present value for the optionaldisabledExpressionattribute.- Parameters:
value- The value for disabledExpression- Returns:
- A modified copy or
thisif not changed
-
withDisabledExpression
Copy the current immutable object by setting an optional value for thedisabledExpressionattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for disabledExpression- Returns:
- A modified copy or
thisif not changed
-
withLabel
Copy the current immutable object by setting a value for thelabelattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for label (can benull)- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofImmutableErrorthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:isPrototype,code,itemId,validationExpression,disabledExpression,label. -
toString
Prints the immutable valueErrorwith attribute values. -
copyOf
Creates an immutable copy of aErrorvalue. 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 Error instance
-
builder
Creates a builder forImmutableError.ImmutableError.builder() .isPrototype(boolean) // optionalisPrototype.code(String | null) // nullablecode.itemId(io.dialob.session.engine.session.model.ItemId) // requireditemId.validationExpression(io.dialob.session.engine.program.model.Expression) // requiredvalidationExpression.disabledExpression(Optional<io.dialob.session.engine.program.model.Expression>) // optionaldisabledExpression.label(io.dialob.session.engine.program.model.Expression | null) // nullablelabel.build();- Returns:
- A new ImmutableError builder
-