Package com.io7m.smfj.validation.api

## Class SMFSchemaValidationError

- java.lang.Object
- - com.io7m.smfj.validation.api.SMFSchemaValidationError

- All Implemented Interfaces:
    `SMFErrorType`, `SMFSchemaValidationErrorType`

      public final class SMFSchemaValidationError
      extends java.lang.Object
      implements SMFSchemaValidationErrorType

  The type of validation errors.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `SMFSchemaValidationError.Builder` | Builds instances of type `SMFSchemaValidationError`.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SMFSchemaValidationError.Builder` | `builder()` | Creates a builder for `SMFSchemaValidationError`.
    `static SMFSchemaValidationError` | `copyOf​(SMFSchemaValidationErrorType instance)` | Creates an immutable copy of a `SMFSchemaValidationErrorType` value.
    `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `SMFSchemaValidationError` that have equal attribute values.
    `java.util.Optional<java.lang.Exception>` | `exception()` |
    `java.lang.String` | `fullMessage()`
    `int` | `hashCode()` | Computes a hash code from attributes: `message`, `exception`.
    `java.lang.String` | `message()` |
    `static SMFSchemaValidationError` | `of​(java.lang.String message, java.util.Optional<? extends java.lang.Exception> exception)` | Construct a new immutable `SMFSchemaValidationError` instance.
    `java.lang.String` | `toString()` | Prints the immutable value `SMFSchemaValidationError` with attribute values.
    `SMFSchemaValidationError` | `withException​(java.lang.Exception value)` | Copy the current immutable object by setting a present value for the optional `exception` attribute.
    `SMFSchemaValidationError` | `withException​(java.util.Optional<? extends java.lang.Exception> optional)` | Copy the current immutable object by setting an optional value for the `exception` attribute.
    `SMFSchemaValidationError` | `withMessage​(java.lang.String value)` | Copy the current immutable object by setting a value for the `message` attribute.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### message

          public java.lang.String message()

      Specified by:
        `message` in interface `SMFErrorType`
      Specified by:
        `message` in interface `SMFSchemaValidationErrorType`
      Returns:
        The value of the `message` attribute

    - #### exception

          public java.util.Optional<java.lang.Exception> exception()

      Specified by:
        `exception` in interface `SMFErrorType`
      Specified by:
        `exception` in interface `SMFSchemaValidationErrorType`
      Returns:
        The value of the `exception` attribute

    - #### withMessage

          public final SMFSchemaValidationError withMessage​(java.lang.String value)

      Copy the current immutable object by setting a value for the `message` attribute. An equals check used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for message
      Returns:
        A modified copy of the `this` object

    - #### withException

          public final SMFSchemaValidationError withException​(java.lang.Exception value)

      Copy the current immutable object by setting a present value for the optional `exception` attribute.
      Parameters:
        `value` - The value for exception
      Returns:
        A modified copy of `this` object

    - #### withException

          public final SMFSchemaValidationError withException​(java.util.Optional<? extends java.lang.Exception> optional)

      Copy the current immutable object by setting an optional value for the `exception` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
      Parameters:
        `optional` - A value for exception
      Returns:
        A modified copy of `this` object

    - #### equals

          public boolean equals​(java.lang.Object another)

      This instance is equal to all instances of `SMFSchemaValidationError` that have equal attribute values.
      Overrides:
        `equals` in class `java.lang.Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `message`, `exception`.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        hashCode value

    - #### toString

          public java.lang.String toString()

      Prints the immutable value `SMFSchemaValidationError` with attribute values.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        A string representation of the value

    - #### fullMessage

          public java.lang.String fullMessage()

      Returns a lazily initialized value of the `fullMessage` attribute. Initialized once and only once and stored for subsequent access with proper synchronization. In case of any exception or error thrown by the lazy value initializer, the result will not be memoised (i.e. remembered) and on next call computation will be attempted again.

      Specified by:
        `fullMessage` in interface `SMFErrorType`
      Returns:
        A lazily initialized value of the `fullMessage` attribute

    - #### of

          public static SMFSchemaValidationError of​(java.lang.String message,
                                                    java.util.Optional<? extends java.lang.Exception> exception)

      Construct a new immutable `SMFSchemaValidationError` instance.
      Parameters:
        `message` - The value for the `message` attribute
        `exception` - The value for the `exception` attribute
      Returns:
        An immutable SMFSchemaValidationError instance

    - #### copyOf

          public static SMFSchemaValidationError copyOf​(SMFSchemaValidationErrorType instance)

      Creates an immutable copy of a `SMFSchemaValidationErrorType` value. 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 SMFSchemaValidationError instance

    - #### builder

          public static SMFSchemaValidationError.Builder builder()

      Creates a builder for `SMFSchemaValidationError`.

           SMFSchemaValidationError.builder()
              .setMessage(String) // required message
              .setException(Exception) // optional exception
              .build();

      Returns:
        A new SMFSchemaValidationError builder