Class ImmutableErrorDetails.Builder

  • Enclosing class:
    ImmutableErrorDetails

    public static final class ImmutableErrorDetails.Builder
    extends Object
    Builds instances of type ImmutableErrorDetails. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        public final ImmutableErrorDetails.Builder from​(ErrorDetails instance)
        Fill a builder with attribute values from the provided ErrorDetails instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • code

        public final ImmutableErrorDetails.Builder code​(long code)
        Initializes the value for the code attribute.

        If not set, this attribute will have a default value as returned by the initializer of code.

        Parameters:
        code - The value for code
        Returns:
        this builder for use in a chained invocation
      • description

        public final ImmutableErrorDetails.Builder description​(String description)
        Initializes the value for the description attribute.
        Parameters:
        description - The value for description (can be null)
        Returns:
        this builder for use in a chained invocation
      • errorCode

        public final ImmutableErrorDetails.Builder errorCode​(String errorCode)
        Initializes the value for the errorCode attribute.
        Parameters:
        errorCode - The value for errorCode (can be null)
        Returns:
        this builder for use in a chained invocation