Package com.io7m.coffeepick.shipilev_net.internal

# Class ASFilenameMetadata

java.lang.Object
com.io7m.coffeepick.shipilev_net.internal.ASFilenameMetadata

All Implemented Interfaces:
  `ASFilenameMetadataType`

    public final class ASFilenameMetadata
    extends java.lang.Object
    implements ASFilenameMetadataType

Information parsed from shipilev.net filenames.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `ASFilenameMetadata.Builder` | Builds instances of type `ASFilenameMetadata`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.lang.String` | `architecture()` |
  `java.util.Optional<RuntimeBuild>` | `build()` |
  `static ASFilenameMetadata.Builder` | `builder()` | Creates a builder for `ASFilenameMetadata`.
  `static ASFilenameMetadata` | `copyOf​(ASFilenameMetadataType instance)` | Creates an immutable copy of a `ASFilenameMetadataType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `ASFilenameMetadata` that have equal attribute values.
  `java.util.Set<java.lang.String>` | `extraTags()` |
  `int` | `hashCode()` | Computes a hash code from attributes: `version`, `architecture`, `platform`, `build`, `extraTags`.
  `java.lang.String` | `platform()` |
  `java.lang.String` | `toString()` | Prints the immutable value `ASFilenameMetadata` with attribute values.
  `RuntimeVersion` | `version()` |
  `ASFilenameMetadata` | `withArchitecture​(java.lang.String value)` | Copy the current immutable object by setting a value for the `architecture` attribute.
  `ASFilenameMetadata` | `withBuild​(RuntimeBuild value)` | Copy the current immutable object by setting a present value for the optional `build` attribute.
  `ASFilenameMetadata` | `withBuild​(java.util.Optional<? extends RuntimeBuild> optional)` | Copy the current immutable object by setting an optional value for the `build` attribute.
  `ASFilenameMetadata` | `withExtraTags​(java.lang.Iterable<java.lang.String> elements)` | Copy the current immutable object with elements that replace the content of `extraTags`.
  `ASFilenameMetadata` | `withExtraTags​(java.lang.String... elements)` | Copy the current immutable object with elements that replace the content of `extraTags`.
  `ASFilenameMetadata` | `withPlatform​(java.lang.String value)` | Copy the current immutable object by setting a value for the `platform` attribute.
  `ASFilenameMetadata` | `withVersion​(RuntimeVersion 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

  - ### version

    public RuntimeVersion version()
    Specified by:
      `version` in interface `ASFilenameMetadataType`
    Returns:
      The version

  - ### architecture

    public java.lang.String architecture()
    Specified by:
      `architecture` in interface `ASFilenameMetadataType`
    Returns:
      The architecture

  - ### platform

    public java.lang.String platform()
    Specified by:
      `platform` in interface `ASFilenameMetadataType`
    Returns:
      The operating system

  - ### build

    public java.util.Optional<RuntimeBuild> build()
    Specified by:
      `build` in interface `ASFilenameMetadataType`
    Returns:
      The build information

  - ### extraTags

    public java.util.Set<java.lang.String> extraTags()
    Specified by:
      `extraTags` in interface `ASFilenameMetadataType`
    Returns:
      The extra tags for the build

  - ### withVersion

    public final ASFilenameMetadata withVersion​(RuntimeVersion 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

  - ### withArchitecture

    public final ASFilenameMetadata withArchitecture​(java.lang.String value)
    Copy the current immutable object by setting a value for the `architecture` attribute. An equals check 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

  - ### withPlatform

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

  - ### withBuild

    public final ASFilenameMetadata withBuild​(RuntimeBuild value)
    Copy the current immutable object by setting a present value for the optional `build` attribute.
    Parameters:
      `value` - The value for build
    Returns:
      A modified copy of `this` object

  - ### withBuild

    public final ASFilenameMetadata withBuild​(java.util.Optional<? extends RuntimeBuild> optional)
    Copy the current immutable object by setting an optional value for the `build` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for build
    Returns:
      A modified copy of `this` object

  - ### withExtraTags

    public final ASFilenameMetadata withExtraTags​(java.lang.String... elements)
    Copy the current immutable object with elements that replace the content of `extraTags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withExtraTags

    public final ASFilenameMetadata withExtraTags​(java.lang.Iterable<java.lang.String> elements)
    Copy the current immutable object with elements that replace the content of `extraTags`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of extraTags elements to set
    Returns:
      A modified copy of `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `ASFilenameMetadata` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `version`, `architecture`, `platform`, `build`, `extraTags`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

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

  - ### builder

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

         ASFilenameMetadata.builder()
            .setVersion(com.io7m.coffeepick.runtime.RuntimeVersion) // required version
            .setArchitecture(String) // required architecture
            .setPlatform(String) // required platform
            .setBuild(com.io7m.coffeepick.runtime.RuntimeBuild) // optional build
            .addExtraTags|addAllExtraTags(String) // extraTags elements
            .build();

    Returns:
      A new ASFilenameMetadata builder