Class 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:
    ImmutableError, Serialized Form
    • Method Detail

      • create

        public static ModifiableError create​(String id,
                                             String code,
                                             String description)
        Construct a modifiable instance of Error.
        Parameters:
        id - The value for the id attribute
        code - The value for the code attribute (can be null)
        description - The value for the description attribute (can be null)
        Returns:
        A new modifiable instance
      • create

        public static ModifiableError create()
        Construct a modifiable instance of Error.
        Returns:
        A new modifiable instance
      • getId

        public final String getId()
        Specified by:
        getId in interface Error
        Returns:
        value of id attribute
      • getCode

        public final String getCode()
        Specified by:
        getCode in interface Error
        Returns:
        value of code attribute, may be null
      • getDescription

        public final String getDescription()
        Specified by:
        getDescription in interface Error
        Returns:
        value of description attribute, may be null
      • clear

        public ModifiableError clear()
        Clears the object by setting all attributes to their initial values.
        Returns:
        this for use in a chained invocation
      • from

        public ModifiableError from​(Error instance)
        Fill this modifiable instance with attribute values from the provided Error instance. 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:
        this for use in a chained invocation
      • from

        public ModifiableError from​(ModifiableError instance)
        Fill this modifiable instance with attribute values from the provided Error instance. 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:
        this for use in a chained invocation
      • setId

        public ModifiableError setId​(String id)
        Assigns a value to the id attribute.
        Parameters:
        id - The value for id
        Returns:
        this for use in a chained invocation
      • setCode

        public ModifiableError setCode​(String code)
        Assigns a value to the code attribute.
        Parameters:
        code - The value for code, can be null
        Returns:
        this for use in a chained invocation
      • setDescription

        public ModifiableError setDescription​(String description)
        Assigns a value to the description attribute.
        Parameters:
        description - The value for description, can be null
        Returns:
        this for use in a chained invocation
      • idIsSet

        public final boolean idIsSet()
        Returns true if the required attribute id is set.
        Returns:
        true if set
      • unsetId

        public final ModifiableError unsetId()
        Reset an attribute to its initial value.
        Returns:
        this for use in a chained invocation
      • isInitialized

        public final boolean isInitialized()
        Returns true if all required attributes are set, indicating that the object is initialized.
        Returns:
        true if set
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ModifiableError that have equal attribute values. An uninitialized instance is equal only to itself.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: id, code, description.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

        public String toString()
        Generates a string representation of this Error. If uninitialized, some attribute values may appear as question marks.
        Overrides:
        toString in class Object
        Returns:
        A string representation