# Class MNames

java.lang.Object
com.io7m.montarre.api.MNames

All Implemented Interfaces:
  `MNamesType`

public final class MNames extends Object implements MNamesType
Name information.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `MNames.Builder`
  Builds instances of type `MNames`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MNames.Builder`
  `builder()`
  Creates a builder for `MNames`.
  `static MNames`
  `copyOf(MNamesType instance)`
  Creates an immutable copy of a `MNamesType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `MNames` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `packageName`, `humanName`, `shortName`, `id`.
  `String`
  `humanName()`
  `UUID`
  `id()`
  `MPackageName`
  `packageName()`
  `MShortName`
  `shortName()`
  `String`
  `toString()`
  Prints the immutable value `MNames` with attribute values.
  `final MNames`
  `withHumanName(String value)`
  Copy the current immutable object by setting a value for the `humanName` attribute.
  `final MNames`
  `withPackageName(MPackageName value)`
  Copy the current immutable object by setting a value for the `packageName` attribute.
  `final MNames`
  `withShortName(MShortName value)`
  Copy the current immutable object by setting a value for the `shortName` attribute.

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

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

- ## Method Details

  - ### packageName

    public MPackageName packageName()
    Specified by:
      `packageName` in interface `MNamesType`
    Returns:
      The package name

  - ### humanName

    public String humanName()
    Specified by:
      `humanName` in interface `MNamesType`
    Returns:
      The humanly-readable application name

  - ### shortName

    public MShortName shortName()
    Specified by:
      `shortName` in interface `MNamesType`
    Returns:
      The package short name

  - ### id

    public UUID id()
    Specified by:
      `id` in interface `MNamesType`
    Returns:
      A name-based UUID from the package name

  - ### withPackageName

    public final MNames withPackageName(MPackageName value)
    Copy the current immutable object by setting a value for the `packageName` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for packageName
    Returns:
      A modified copy of the `this` object

  - ### withHumanName

    public final MNames withHumanName(String value)
    Copy the current immutable object by setting a value for the `humanName` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for humanName
    Returns:
      A modified copy of the `this` object

  - ### withShortName

    public final MNames withShortName(MShortName value)
    Copy the current immutable object by setting a value for the `shortName` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for shortName
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `MNames` 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: `packageName`, `humanName`, `shortName`, `id`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

    public String toString()
    Prints the immutable value `MNames` with attribute values.
    Overrides:
      `toString` in class `Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static MNames copyOf(MNamesType instance)
    Creates an immutable copy of a `MNamesType` 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 MNames instance

  - ### builder

    public static MNames.Builder builder()
    Creates a builder for `MNames`.

         MNames.builder()
            .setPackageName(com.io7m.montarre.api.MPackageName) // required packageName
            .setHumanName(String) // optional humanName
            .setShortName(com.io7m.montarre.api.MShortName) // required shortName
            .build();

    Returns:
      A new MNames builder