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.
  • 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 or this if not changed
    • 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 or this if not changed
    • 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