com.io7m.smfj.validation.api

## Class SMFSchemaVersion

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

- All Implemented Interfaces:
    SMFSchemaVersionType, Comparable<SMFSchemaVersionType>

      @Generated(value={"Immutables.generator","SMFSchemaVersionType"})
      public final class SMFSchemaVersion
      extends Object
      implements SMFSchemaVersionType

  A schema version. This refers to the version of the schema language, not a specific schema.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFSchemaVersion.Builder` | `builder()` Creates a builder for `SMFSchemaVersion`.
    `static SMFSchemaVersion` | `copyOf(SMFSchemaVersionType instance)` Creates an immutable copy of a `SMFSchemaVersionType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFSchemaVersion` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `major`, `minor`.
    `int` | `major()`
    `int` | `minor()`
    `static SMFSchemaVersion` | `of(int major, int minor)` Construct a new immutable `SMFSchemaVersion` instance.
    `String` | `toString()` Prints the immutable value `SMFSchemaVersion` with attribute values.
    `SMFSchemaVersion` | `withMajor(int value)` Copy the current immutable object by setting a value for the `major` attribute.
    `SMFSchemaVersion` | `withMinor(int value)` Copy the current immutable object by setting a value for the `minor` attribute.

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

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

    - ### Methods inherited from interface com.io7m.smfj.validation.api.SMFSchemaVersionType

      `compareTo`

- - ### Method Detail

    - #### major

          public int major()

      Specified by:
        `major` in interface `SMFSchemaVersionType`
      Returns:
        The major number for a format

    - #### minor

          public int minor()

      Specified by:
        `minor` in interface `SMFSchemaVersionType`
      Returns:
        The minor number for a format

    - #### withMajor

          public final SMFSchemaVersion withMajor(int value)

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

    - #### withMinor

          public final SMFSchemaVersion withMinor(int value)

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

    - #### equals

          public boolean equals(Object another)

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

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `major`, `minor`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### of

          public static SMFSchemaVersion of(int major,
                                            int minor)

      Construct a new immutable `SMFSchemaVersion` instance.
      Parameters:
        `major` - The value for the `major` attribute
        `minor` - The value for the `minor` attribute
      Returns:
        An immutable SMFSchemaVersion instance

    - #### copyOf

          public static SMFSchemaVersion copyOf(SMFSchemaVersionType instance)

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

    - #### builder

          public static SMFSchemaVersion.Builder builder()

      Creates a builder for `SMFSchemaVersion`.
      Returns:
        A new SMFSchemaVersion builder

Copyright © 2017 <code@io7m.com> http://io7m.com