Package com.io7m.montarre.adoptium

# Class MEARuntime

java.lang.Object
com.io7m.montarre.adoptium.MEARuntime

All Implemented Interfaces:
  `MEARuntimeType`

public final class MEARuntime extends Object implements MEARuntimeType
An Adoptium runtime.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MArchitectureName`
  `architecture()`
  `static MEARuntime.Builder`
  `builder()`
  Creates a builder for `MEARuntime`.
  `static MEARuntime`
  `copyOf(MEARuntimeType instance)`
  Creates an immutable copy of a `MEARuntimeType` value.
  `URI`
  `downloadLink()`
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `MEARuntime` that have equal attribute values.
  `MArchiveFormat`
  `format()`
  `MHash`
  `hash()`
  `int`
  `hashCode()`
  Computes a hash code from attributes: `hash`, `downloadLink`, `size`, `architecture`, `operatingSystem`, `format`, `version`.
  `MOperatingSystemName`
  `operatingSystem()`
  `long`
  `size()`
  `String`
  `toString()`
  Prints the immutable value `MEARuntime` with attribute values.
  `Runtime.Version`
  `version()`
  `final MEARuntime`
  `withArchitecture(MArchitectureName value)`
  Copy the current immutable object by setting a value for the `architecture` attribute.
  `final MEARuntime`
  `withDownloadLink(URI value)`
  Copy the current immutable object by setting a value for the `downloadLink` attribute.
  `final MEARuntime`
  `withFormat(MArchiveFormat value)`
  Copy the current immutable object by setting a value for the `format` attribute.
  `final MEARuntime`
  `withHash(MHash value)`
  Copy the current immutable object by setting a value for the `hash` attribute.
  `final MEARuntime`
  `withOperatingSystem(MOperatingSystemName value)`
  Copy the current immutable object by setting a value for the `operatingSystem` attribute.
  `final MEARuntime`
  `withSize(long value)`
  Copy the current immutable object by setting a value for the `size` attribute.
  `final MEARuntime`
  `withVersion(Runtime.Version value)`
  Copy the current immutable object by setting a value for the `version` attribute.

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

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

- ## Method Details

  - ### hash

    public MHash hash()
    Specified by:
      `hash` in interface `MEARuntimeType`
    Returns:
      The checksum of the remote file

  - ### downloadLink

    public URI downloadLink()
    Specified by:
      `downloadLink` in interface `MEARuntimeType`
    Returns:
      The download link

  - ### size

    public long size()
    Specified by:
      `size` in interface `MEARuntimeType`
    Returns:
      The size of the remote file

  - ### architecture

    public MArchitectureName architecture()
    Specified by:
      `architecture` in interface `MEARuntimeType`
    Returns:
      The hardware architecture of the remote file

  - ### operatingSystem

    public MOperatingSystemName operatingSystem()
    Specified by:
      `operatingSystem` in interface `MEARuntimeType`
    Returns:
      The operating system of the remote file

  - ### format

    public MArchiveFormat format()
    Specified by:
      `format` in interface `MEARuntimeType`
    Returns:
      The format type

  - ### version

    public Runtime.Version version()
    Specified by:
      `version` in interface `MEARuntimeType`
    Returns:
      The runtime version

  - ### withHash

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

  - ### withDownloadLink

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

  - ### withSize

    public final MEARuntime withSize(long value)
    Copy the current immutable object by setting a value for the `size` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for size
    Returns:
      A modified copy of the `this` object

  - ### withArchitecture

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

  - ### withOperatingSystem

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

  - ### withFormat

    public final MEARuntime withFormat(MArchiveFormat value)
    Copy the current immutable object by setting a value for the `format` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for format
    Returns:
      A modified copy of the `this` object

  - ### withVersion

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

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `MEARuntime` 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: `hash`, `downloadLink`, `size`, `architecture`, `operatingSystem`, `format`, `version`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

         MEARuntime.builder()
            .setHash(com.io7m.montarre.api.MHash) // required hash
            .setDownloadLink(java.net.URI) // required downloadLink
            .setSize(long) // required size
            .setArchitecture(com.io7m.montarre.api.MArchitectureName) // required architecture
            .setOperatingSystem(com.io7m.montarre.api.MOperatingSystemName) // required operatingSystem
            .setFormat(com.io7m.montarre.api.MArchiveFormat) // required format
            .setVersion(Runtime.Version) // required version
            .build();

    Returns:
      A new MEARuntime builder