com.io7m.smfj.core

## Class SMFFormatVersionMutable

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

- All Implemented Interfaces:
    SMFFormatVersionType, Comparable<SMFFormatVersionType>

      @Generated(value={"Modifiables.generator","SMFFormatVersionType"})
      public final class SMFFormatVersionMutable
      extends Object
      implements SMFFormatVersionType

  A modifiable implementation of the `SMFFormatVersionType` type.

  Use the `create()` static factory methods to create new instances. Use the `toImmutable()` method to convert to canonical immutable instances.

  SMFFormatVersionMutable is not thread-safe

  See Also:
    `SMFFormatVersion`

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SMFFormatVersionMutable` | `clear()` Clears the object by setting all attributes to their initial values.
    `static SMFFormatVersionMutable` | `create()` Construct a modifiable instance of `SMFFormatVersionType`.
    `static SMFFormatVersionMutable` | `create(int major, int minor)` Construct a modifiable instance of `SMFFormatVersionType`.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFFormatVersionMutable` that have equal attribute values.
    `SMFFormatVersionMutable` | `from(SMFFormatVersionType instance)` Fill this modifiable instance with attribute values from the provided `SMFFormatVersionType` instance.
    `int` | `hashCode()` Computes a hash code from attributes: `major`, `minor`.
    `boolean` | `isInitialized()` Returns `true` if all required attributes are set, indicating that the object is initialized.
    `int` | `major()`
    `boolean` | `majorIsSet()` Returns `true` if the required attribute `major` is set.
    `int` | `minor()`
    `boolean` | `minorIsSet()` Returns `true` if the required attribute `minor` is set.
    `SMFFormatVersionMutable` | `setMajor(int major)` Assigns a value to the `major` attribute.
    `SMFFormatVersionMutable` | `setMinor(int minor)` Assigns a value to the `minor` attribute.
    `SMFFormatVersion` | `toImmutable()` Converts to `SMFFormatVersion`.
    `String` | `toString()` Generates a string representation of this `SMFFormatVersionType`.
    `SMFFormatVersionMutable` | `unsetMajor()` Reset an attribute to its initial value.
    `SMFFormatVersionMutable` | `unsetMinor()` Reset an attribute to its initial value.

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

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

    - ### Methods inherited from interface com.io7m.smfj.core.SMFFormatVersionType

      `compareTo, toHumanString`

- - ### Method Detail

    - #### create

          public static SMFFormatVersionMutable create(int major,
                                                       int minor)

      Construct a modifiable instance of `SMFFormatVersionType`.
      Parameters:
        `major` - The value for the `major` attribute
        `minor` - The value for the `minor` attribute
      Returns:
        A new modifiable instance

    - #### create

          public static SMFFormatVersionMutable create()

      Construct a modifiable instance of `SMFFormatVersionType`.
      Returns:
        A new modifiable instance

    - #### major

          public final int major()

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

    - #### minor

          public final int minor()

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

    - #### clear

          public SMFFormatVersionMutable clear()

      Clears the object by setting all attributes to their initial values.
      Returns:
        `this` for use in a chained invocation

    - #### from

          public SMFFormatVersionMutable from(SMFFormatVersionType instance)

      Fill this modifiable instance with attribute values from the provided `SMFFormatVersionType` 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

    - #### setMajor

          public SMFFormatVersionMutable setMajor(int major)

      Assigns a value to the `major` attribute.
      Parameters:
        `major` - The value for major
      Returns:
        `this` for use in a chained invocation

    - #### setMinor

          public SMFFormatVersionMutable setMinor(int minor)

      Assigns a value to the `minor` attribute.
      Parameters:
        `minor` - The value for minor
      Returns:
        `this` for use in a chained invocation

    - #### majorIsSet

          public final boolean majorIsSet()

      Returns `true` if the required attribute `major` is set.
      Returns:
        `true` if set

    - #### minorIsSet

          public final boolean minorIsSet()

      Returns `true` if the required attribute `minor` is set.
      Returns:
        `true` if set

    - #### unsetMajor

          public final SMFFormatVersionMutable unsetMajor()

      Reset an attribute to its initial value.
      Returns:
        `this` for use in a chained invocation

    - #### unsetMinor

          public final SMFFormatVersionMutable unsetMinor()

      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

    - #### toImmutable

          public final SMFFormatVersion toImmutable()

      Converts to `SMFFormatVersion`.
      Returns:
        An immutable instance of SMFFormatVersion

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `SMFFormatVersionMutable` 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: `major`, `minor`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Generates a string representation of this `SMFFormatVersionType`. If uninitialized, some attribute values may appear as question marks.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation

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