Package com.io7m.smfj.core

## Class SMFSchemaIdentifier

- java.lang.Object
- - com.io7m.smfj.core.SMFSchemaIdentifier

- All Implemented Interfaces:
    `SMFSchemaIdentifierType`

      public final class SMFSchemaIdentifier
      extends java.lang.Object
      implements SMFSchemaIdentifierType

  A schema identifier.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static SMFSchemaIdentifier.Builder` | `builder()` | Creates a builder for `SMFSchemaIdentifier`.
    `static SMFSchemaIdentifier` | `copyOf​(SMFSchemaIdentifierType instance)` | Creates an immutable copy of a `SMFSchemaIdentifierType` value.
    `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `SMFSchemaIdentifier` that have equal attribute values.
    `int` | `hashCode()` | Computes a hash code from attributes: `name`, `versionMajor`, `versionMinor`.
    `SMFSchemaName` | `name()` |
    `static SMFSchemaIdentifier` | `of​(SMFSchemaName name, int versionMajor, int versionMinor)` | Construct a new immutable `SMFSchemaIdentifier` instance.
    `java.lang.String` | `toHumanString()`
    `java.lang.String` | `toString()` | Prints the immutable value `SMFSchemaIdentifier` with attribute values.
    `int` | `versionMajor()` |
    `int` | `versionMinor()` |
    `SMFSchemaIdentifier` | `withName​(SMFSchemaName value)` | Copy the current immutable object by setting a value for the `name` attribute.
    `SMFSchemaIdentifier` | `withVersionMajor​(int value)` | Copy the current immutable object by setting a value for the `versionMajor` attribute.
    `SMFSchemaIdentifier` | `withVersionMinor​(int value)` | Copy the current immutable object by setting a value for the `versionMinor` attribute.

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

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

- - ### Method Detail

    - #### name

          public SMFSchemaName name()

      Specified by:
        `name` in interface `SMFSchemaIdentifierType`
      Returns:
        The schema name

    - #### versionMajor

          public int versionMajor()

      Specified by:
        `versionMajor` in interface `SMFSchemaIdentifierType`
      Returns:
        The schema major version

    - #### versionMinor

          public int versionMinor()

      Specified by:
        `versionMinor` in interface `SMFSchemaIdentifierType`
      Returns:
        The schema minor version

    - #### withName

          public final SMFSchemaIdentifier withName​(SMFSchemaName value)

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

    - #### withVersionMajor

          public final SMFSchemaIdentifier withVersionMajor​(int value)

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

    - #### withVersionMinor

          public final SMFSchemaIdentifier withVersionMinor​(int value)

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

    - #### equals

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

      This instance is equal to all instances of `SMFSchemaIdentifier` 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: `name`, `versionMajor`, `versionMinor`.
      Overrides:
        `hashCode` in class `java.lang.Object`
      Returns:
        hashCode value

    - #### toString

          public java.lang.String toString()

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

    - #### toHumanString

          public java.lang.String toHumanString()

      Returns a lazily initialized value of the `toHumanString` 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:
        `toHumanString` in interface `SMFSchemaIdentifierType`
      Returns:
        A lazily initialized value of the `toHumanString` attribute

    - #### of

          public static SMFSchemaIdentifier of​(SMFSchemaName name,
                                               int versionMajor,
                                               int versionMinor)

      Construct a new immutable `SMFSchemaIdentifier` instance.
      Parameters:
        `name` - The value for the `name` attribute
        `versionMajor` - The value for the `versionMajor` attribute
        `versionMinor` - The value for the `versionMinor` attribute
      Returns:
        An immutable SMFSchemaIdentifier instance

    - #### copyOf

          public static SMFSchemaIdentifier copyOf​(SMFSchemaIdentifierType instance)

      Creates an immutable copy of a `SMFSchemaIdentifierType` 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 SMFSchemaIdentifier instance

    - #### builder

          public static SMFSchemaIdentifier.Builder builder()

      Creates a builder for `SMFSchemaIdentifier`.

           SMFSchemaIdentifier.builder()
              .setName(com.io7m.smfj.core.SMFSchemaName) // required name
              .setVersionMajor(int) // optional versionMajor
              .setVersionMinor(int) // optional versionMinor
              .build();

      Returns:
        A new SMFSchemaIdentifier builder