Package com.io7m.montarre.api

# Class MMetadataFlatpak

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

All Implemented Interfaces:
  `MMetadataFlatpakType`

public final class MMetadataFlatpak extends Object implements MMetadataFlatpakType
Package metadata specific to Flatpak.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static MMetadataFlatpak.Builder`
  `builder()`
  Creates a builder for `MMetadataFlatpak`.
  `static MMetadataFlatpak`
  `copyOf(MMetadataFlatpakType instance)`
  Creates an immutable copy of a `MMetadataFlatpakType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `MMetadataFlatpak` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `permissions`, `runtimes`.
  `List<MFlatpakPermission>`
  `permissions()`
  `List<MFlatpakRuntime>`
  `runtimes()`
  `String`
  `toString()`
  Prints the immutable value `MMetadataFlatpak` with attribute values.
  `final MMetadataFlatpak`
  `withPermissions(MFlatpakPermission... elements)`
  Copy the current immutable object with elements that replace the content of `permissions`.
  `final MMetadataFlatpak`
  `withPermissions(Iterable<? extends MFlatpakPermission> elements)`
  Copy the current immutable object with elements that replace the content of `permissions`.
  `final MMetadataFlatpak`
  `withRuntimes(MFlatpakRuntime... elements)`
  Copy the current immutable object with elements that replace the content of `runtimes`.
  `final MMetadataFlatpak`
  `withRuntimes(Iterable<? extends MFlatpakRuntime> elements)`
  Copy the current immutable object with elements that replace the content of `runtimes`.

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

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

- ## Method Details

  - ### permissions

    public List<MFlatpakPermission> permissions()
    Specified by:
      `permissions` in interface `MMetadataFlatpakType`
    Returns:
      The required application permissions

  - ### runtimes

    public List<MFlatpakRuntime> runtimes()
    Specified by:
      `runtimes` in interface `MMetadataFlatpakType`
    Returns:
      The required runtimes

  - ### withPermissions

    public final MMetadataFlatpak withPermissions(MFlatpakPermission... elements)
    Copy the current immutable object with elements that replace the content of `permissions`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withPermissions

    public final MMetadataFlatpak withPermissions(Iterable<? extends MFlatpakPermission> elements)
    Copy the current immutable object with elements that replace the content of `permissions`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of permissions elements to set
    Returns:
      A modified copy of `this` object

  - ### withRuntimes

    public final MMetadataFlatpak withRuntimes(MFlatpakRuntime... elements)
    Copy the current immutable object with elements that replace the content of `runtimes`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withRuntimes

    public final MMetadataFlatpak withRuntimes(Iterable<? extends MFlatpakRuntime> elements)
    Copy the current immutable object with elements that replace the content of `runtimes`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of runtimes elements to set
    Returns:
      A modified copy of `this` object

  - ### equals

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

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

         MMetadataFlatpak.builder()
            .addPermissions|addAllPermissions(com.io7m.montarre.api.MFlatpakPermission) // permissions elements
            .addRuntimes|addAllRuntimes(com.io7m.montarre.api.MFlatpakRuntime) // runtimes elements
            .build();

    Returns:
      A new MMetadataFlatpak builder