Package io.dialob.api.questionnaire
Class ImmutableError
java.lang.Object
io.dialob.api.questionnaire.ImmutableError
- All Implemented Interfaces:
Error,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableError
extends Object
implements Error
Immutable implementation of
Error.
Use the builder to create immutable instances:
ImmutableError.builder().
Use the static factory method to create immutable instances:
ImmutableError.of().
- 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()getId()inthashCode()Computes a hash code from attributes:id,code,description.static ImmutableErrorConstruct a new immutableErrorinstance.toString()Prints the immutable valueErrorwith attribute values.final ImmutableErrorCopy the current immutable object by setting a value for thecodeattribute.final ImmutableErrorwithDescription(String value) Copy the current immutable object by setting a value for thedescriptionattribute.final ImmutableErrorCopy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
-
getCode
-
getDescription
- Specified by:
getDescriptionin interfaceError- Returns:
- The value of the
descriptionattribute
-
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- Returns:
- A modified copy of 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 of the
thisobject
-
withDescription
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description (can benull)- Returns:
- A modified copy of 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:id,code,description. -
toString
Prints the immutable valueErrorwith attribute values. -
of
Construct a new immutableErrorinstance.- Parameters:
id- The value for theidattributecode- The value for thecodeattributedescription- The value for thedescriptionattribute- Returns:
- An immutable Error instance
-
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() .id(String) // requiredid.code(String | null) // nullablecode.description(String | null) // nullabledescription.build();- Returns:
- A new ImmutableError builder
-