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 theErrortype.Use the
create()static factory methods to create new instances. Use thetoImmutable()method to convert to canonical immutable instances.ModifiableError is not thread-safe
- See Also:
ImmutableError, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ModifiableErrorclear()Clears the object by setting all attributes to their initial values.static ModifiableErrorcreate()Construct a modifiable instance ofError.static ModifiableErrorcreate(String id, String code, String description)Construct a modifiable instance ofError.booleanequals(Object another)This instance is equal to all instances ofModifiableErrorthat have equal attribute values.ModifiableErrorfrom(Error instance)Fill this modifiable instance with attribute values from the providedErrorinstance.ModifiableErrorfrom(ModifiableError instance)Fill this modifiable instance with attribute values from the providedErrorinstance.StringgetCode()StringgetDescription()StringgetId()inthashCode()Computes a hash code from attributes:id,code,description.booleanidIsSet()Returnstrueif the required attributeidis set.booleanisInitialized()Returnstrueif all required attributes are set, indicating that the object is initialized.ModifiableErrorsetCode(String code)Assigns a value to thecodeattribute.ModifiableErrorsetDescription(String description)Assigns a value to thedescriptionattribute.ModifiableErrorsetId(String id)Assigns a value to theidattribute.ImmutableErrortoImmutable()Converts toImmutableError.StringtoString()Generates a string representation of thisError.ModifiableErrorunsetId()Reset an attribute to its initial value.
-
-
-
Method Detail
-
create
public static ModifiableError create(String id, String code, String description)
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
public static ModifiableError create()
Construct a modifiable instance ofError.- Returns:
- A new modifiable instance
-
getId
public final String getId()
-
getCode
public final String getCode()
-
getDescription
public final String getDescription()
- Specified by:
getDescriptionin interfaceError- Returns:
- value of
descriptionattribute, may benull
-
clear
public ModifiableError clear()
Clears the object by setting all attributes to their initial values.- Returns:
thisfor use in a chained invocation
-
from
public ModifiableError from(Error instance)
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
public ModifiableError from(ModifiableError instance)
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
public ModifiableError setId(String id)
Assigns a value to theidattribute.- Parameters:
id- The value for id- Returns:
thisfor use in a chained invocation
-
setCode
public ModifiableError setCode(String code)
Assigns a value to thecodeattribute.- Parameters:
code- The value for code, can benull- Returns:
thisfor use in a chained invocation
-
setDescription
public ModifiableError setDescription(String description)
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
public final ModifiableError 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
public final ImmutableError toImmutable()
Converts toImmutableError.- Returns:
- An immutable instance of Error
-
equals
public boolean equals(@Nullable Object another)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.
-
-