Package io.dialob.api.questionnaire
Class ModifiableError
java.lang.Object
io.dialob.api.questionnaire.ModifiableError
- All Implemented Interfaces:
Error,Serializable
@ParametersAreNonnullByDefault
@Generated({"Modifiables.generator","Error"})
@NotThreadSafe
public final class ModifiableError
extends Object
implements Error
A modifiable implementation of the
Error type.
Use the create() static factory methods to create new instances.
Use the toImmutable() method to convert to canonical immutable instances.
ModifiableError is not thread-safe
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionclear()Clears the object by setting all attributes to their initial values.static ModifiableErrorcreate()Construct a modifiable instance ofError.static ModifiableErrorConstruct a modifiable instance ofError.booleanThis instance is equal to all instances ofModifiableErrorthat have equal attribute values.Fill this modifiable instance with attribute values from the providedErrorinstance.from(ModifiableError instance) Fill this modifiable instance with attribute values from the providedErrorinstance.final StringgetCode()final Stringfinal StringgetId()inthashCode()Computes a hash code from attributes:id,code,description.final booleanidIsSet()Returnstrueif the required attributeidis set.final booleanReturnstrueif all required attributes are set, indicating that the object is initialized.Assigns a value to thecodeattribute.setDescription(String description) Assigns a value to thedescriptionattribute.Assigns a value to theidattribute.final ImmutableErrorConverts toImmutableError.toString()Generates a string representation of thisError.final ModifiableErrorunsetId()Reset an attribute to its initial value.
-
Method Details
-
create
Construct a modifiable instance ofError.- Parameters:
id- The value for theidattributecode- The value for thecodeattribute (can benull)description- The value for thedescriptionattribute (can benull)- Returns:
- A new modifiable instance
-
create
Construct a modifiable instance ofError.- Returns:
- A new modifiable instance
-
getId
-
getCode
-
getDescription
- Specified by:
getDescriptionin interfaceError- Returns:
- value of
descriptionattribute, may benull
-
clear
Clears the object by setting all attributes to their initial values.- Returns:
thisfor use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedErrorinstance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).- Parameters:
instance- The instance from which to copy values- Returns:
thisfor use in a chained invocation
-
from
Fill this modifiable instance with attribute values from the providedErrorinstance. Regular attribute values will be overridden, i.e. replaced with ones of an instance. Any of the instance's absent optional values will not be copied (will not override current values).- Parameters:
instance- The instance from which to copy values- Returns:
thisfor use in a chained invocation
-
setId
Assigns a value to theidattribute.- Parameters:
id- The value for id- Returns:
thisfor use in a chained invocation
-
setCode
Assigns a value to thecodeattribute.- Parameters:
code- The value for code, can benull- Returns:
thisfor use in a chained invocation
-
setDescription
Assigns a value to thedescriptionattribute.- Parameters:
description- The value for description, can benull- Returns:
thisfor use in a chained invocation
-
idIsSet
public final boolean idIsSet()Returnstrueif the required attributeidis set.- Returns:
trueif set
-
unsetId
Reset an attribute to its initial value.- Returns:
thisfor use in a chained invocation
-
isInitialized
public final boolean isInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.- Returns:
trueif set
-
toImmutable
Converts toImmutableError.- Returns:
- An immutable instance of Error
-
equals
This instance is equal to all instances ofModifiableErrorthat have equal attribute values. An uninitialized instance is equal only to itself. -
hashCode
public int hashCode()Computes a hash code from attributes:id,code,description. -
toString
Generates a string representation of thisError. If uninitialized, some attribute values may appear as question marks.
-