Package com.io7m.coffeepick.api

# Class CoffeePickSearch.Builder

java.lang.Object
com.io7m.coffeepick.api.CoffeePickSearch.Builder

Enclosing class:
  CoffeePickSearch

    public static final class CoffeePickSearch.Builder
    extends java.lang.Object

Builds instances of type `CoffeePickSearch`. Initialize attributes and then invoke the `build()` method to create an immutable instance.

`Builder` is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `CoffeePickSearch.Builder` | `addAllRequiredTags​(java.lang.Iterable<java.lang.String> elements)` | Adds elements to `requiredTags` set.
  `CoffeePickSearch.Builder` | `addRequiredTags​(java.lang.String element)` | Adds one element to `requiredTags` set.
  `CoffeePickSearch.Builder` | `addRequiredTags​(java.lang.String... elements)` | Adds elements to `requiredTags` set.
  `CoffeePickSearch` | `build()` | Builds a new `CoffeePickSearch`.
  `CoffeePickSearch.Builder` | `from​(CoffeePickSearchType instance)` | Fill a builder with attribute values from the provided `CoffeePickSearchType` instance.
  `CoffeePickSearch.Builder` | `setArchitecture​(java.lang.String architecture)` | Initializes the optional value `architecture` to architecture.
  `CoffeePickSearch.Builder` | `setArchitecture​(java.util.Optional<java.lang.String> architecture)` | Initializes the optional value `architecture` to architecture.
  `CoffeePickSearch.Builder` | `setArchiveHash​(RuntimeHash archiveHash)` | Initializes the optional value `archiveHash` to archiveHash.
  `CoffeePickSearch.Builder` | `setArchiveHash​(java.util.Optional<? extends RuntimeHash> archiveHash)` | Initializes the optional value `archiveHash` to archiveHash.
  `CoffeePickSearch.Builder` | `setArchiveSize​(long archiveSize)` | Initializes the optional value `archiveSize` to archiveSize.
  `CoffeePickSearch.Builder` | `setArchiveSize​(java.util.OptionalLong archiveSize)` | Initializes the optional value `archiveSize` to archiveSize.
  `CoffeePickSearch.Builder` | `setArchiveURI​(java.net.URI archiveURI)` | Initializes the optional value `archiveURI` to archiveURI.
  `CoffeePickSearch.Builder` | `setArchiveURI​(java.util.Optional<? extends java.net.URI> archiveURI)` | Initializes the optional value `archiveURI` to archiveURI.
  `CoffeePickSearch.Builder` | `setConfiguration​(RuntimeConfiguration configuration)` | Initializes the optional value `configuration` to configuration.
  `CoffeePickSearch.Builder` | `setConfiguration​(java.util.Optional<? extends RuntimeConfiguration> configuration)` | Initializes the optional value `configuration` to configuration.
  `CoffeePickSearch.Builder` | `setId​(java.lang.String id)` | Initializes the optional value `id` to id.
  `CoffeePickSearch.Builder` | `setId​(java.util.Optional<java.lang.String> id)` | Initializes the optional value `id` to id.
  `CoffeePickSearch.Builder` | `setPlatform​(java.lang.String platform)` | Initializes the optional value `platform` to platform.
  `CoffeePickSearch.Builder` | `setPlatform​(java.util.Optional<java.lang.String> platform)` | Initializes the optional value `platform` to platform.
  `CoffeePickSearch.Builder` | `setRepository​(java.lang.String repository)` | Initializes the optional value `repository` to repository.
  `CoffeePickSearch.Builder` | `setRepository​(java.util.Optional<java.lang.String> repository)` | Initializes the optional value `repository` to repository.
  `CoffeePickSearch.Builder` | `setRequiredTags​(java.lang.Iterable<java.lang.String> elements)` | Sets or replaces all elements for `requiredTags` set.
  `CoffeePickSearch.Builder` | `setVersionRange​(RuntimeVersionRange versionRange)` | Initializes the optional value `versionRange` to versionRange.
  `CoffeePickSearch.Builder` | `setVersionRange​(java.util.Optional<? extends RuntimeVersionRange> versionRange)` | Initializes the optional value `versionRange` to versionRange.
  `CoffeePickSearch.Builder` | `setVm​(java.lang.String vm)` | Initializes the optional value `vm` to vm.
  `CoffeePickSearch.Builder` | `setVm​(java.util.Optional<java.lang.String> vm)` | Initializes the optional value `vm` to vm.

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final CoffeePickSearch.Builder from​(CoffeePickSearchType instance)
    Fill a builder with attribute values from the provided `CoffeePickSearchType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### setRepository

    public final CoffeePickSearch.Builder setRepository​(java.lang.String repository)
    Initializes the optional value `repository` to repository.
    Parameters:
      `repository` - The value for repository
    Returns:
      `this` builder for chained invocation

  - ### setRepository

    public final CoffeePickSearch.Builder setRepository​(java.util.Optional<java.lang.String> repository)
    Initializes the optional value `repository` to repository.
    Parameters:
      `repository` - The value for repository
    Returns:
      `this` builder for use in a chained invocation

  - ### setVersionRange

    public final CoffeePickSearch.Builder setVersionRange​(RuntimeVersionRange versionRange)
    Initializes the optional value `versionRange` to versionRange.
    Parameters:
      `versionRange` - The value for versionRange
    Returns:
      `this` builder for chained invocation

  - ### setVersionRange

    public final CoffeePickSearch.Builder setVersionRange​(java.util.Optional<? extends RuntimeVersionRange> versionRange)
    Initializes the optional value `versionRange` to versionRange.
    Parameters:
      `versionRange` - The value for versionRange
    Returns:
      `this` builder for use in a chained invocation

  - ### setPlatform

    public final CoffeePickSearch.Builder setPlatform​(java.lang.String platform)
    Initializes the optional value `platform` to platform.
    Parameters:
      `platform` - The value for platform
    Returns:
      `this` builder for chained invocation

  - ### setPlatform

    public final CoffeePickSearch.Builder setPlatform​(java.util.Optional<java.lang.String> platform)
    Initializes the optional value `platform` to platform.
    Parameters:
      `platform` - The value for platform
    Returns:
      `this` builder for use in a chained invocation

  - ### setArchitecture

    public final CoffeePickSearch.Builder setArchitecture​(java.lang.String architecture)
    Initializes the optional value `architecture` to architecture.
    Parameters:
      `architecture` - The value for architecture
    Returns:
      `this` builder for chained invocation

  - ### setArchitecture

    public final CoffeePickSearch.Builder setArchitecture​(java.util.Optional<java.lang.String> architecture)
    Initializes the optional value `architecture` to architecture.
    Parameters:
      `architecture` - The value for architecture
    Returns:
      `this` builder for use in a chained invocation

  - ### setVm

    public final CoffeePickSearch.Builder setVm​(java.lang.String vm)
    Initializes the optional value `vm` to vm.
    Parameters:
      `vm` - The value for vm
    Returns:
      `this` builder for chained invocation

  - ### setVm

    public final CoffeePickSearch.Builder setVm​(java.util.Optional<java.lang.String> vm)
    Initializes the optional value `vm` to vm.
    Parameters:
      `vm` - The value for vm
    Returns:
      `this` builder for use in a chained invocation

  - ### setConfiguration

    public final CoffeePickSearch.Builder setConfiguration​(RuntimeConfiguration configuration)
    Initializes the optional value `configuration` to configuration.
    Parameters:
      `configuration` - The value for configuration
    Returns:
      `this` builder for chained invocation

  - ### setConfiguration

    public final CoffeePickSearch.Builder setConfiguration​(java.util.Optional<? extends RuntimeConfiguration> configuration)
    Initializes the optional value `configuration` to configuration.
    Parameters:
      `configuration` - The value for configuration
    Returns:
      `this` builder for use in a chained invocation

  - ### setArchiveURI

    public final CoffeePickSearch.Builder setArchiveURI​(java.net.URI archiveURI)
    Initializes the optional value `archiveURI` to archiveURI.
    Parameters:
      `archiveURI` - The value for archiveURI
    Returns:
      `this` builder for chained invocation

  - ### setArchiveURI

    public final CoffeePickSearch.Builder setArchiveURI​(java.util.Optional<? extends java.net.URI> archiveURI)
    Initializes the optional value `archiveURI` to archiveURI.
    Parameters:
      `archiveURI` - The value for archiveURI
    Returns:
      `this` builder for use in a chained invocation

  - ### setArchiveSize

    public final CoffeePickSearch.Builder setArchiveSize​(long archiveSize)
    Initializes the optional value `archiveSize` to archiveSize.
    Parameters:
      `archiveSize` - The value for archiveSize
    Returns:
      `this` builder for chained invocation

  - ### setArchiveSize

    public final CoffeePickSearch.Builder setArchiveSize​(java.util.OptionalLong archiveSize)
    Initializes the optional value `archiveSize` to archiveSize.
    Parameters:
      `archiveSize` - The value for archiveSize
    Returns:
      `this` builder for use in a chained invocation

  - ### setArchiveHash

    public final CoffeePickSearch.Builder setArchiveHash​(RuntimeHash archiveHash)
    Initializes the optional value `archiveHash` to archiveHash.
    Parameters:
      `archiveHash` - The value for archiveHash
    Returns:
      `this` builder for chained invocation

  - ### setArchiveHash

    public final CoffeePickSearch.Builder setArchiveHash​(java.util.Optional<? extends RuntimeHash> archiveHash)
    Initializes the optional value `archiveHash` to archiveHash.
    Parameters:
      `archiveHash` - The value for archiveHash
    Returns:
      `this` builder for use in a chained invocation

  - ### setId

    public final CoffeePickSearch.Builder setId​(java.lang.String id)
    Initializes the optional value `id` to id.
    Parameters:
      `id` - The value for id
    Returns:
      `this` builder for chained invocation

  - ### setId

    public final CoffeePickSearch.Builder setId​(java.util.Optional<java.lang.String> id)
    Initializes the optional value `id` to id.
    Parameters:
      `id` - The value for id
    Returns:
      `this` builder for use in a chained invocation

  - ### addRequiredTags

    public final CoffeePickSearch.Builder addRequiredTags​(java.lang.String element)
    Adds one element to `requiredTags` set.
    Parameters:
      `element` - A requiredTags element
    Returns:
      `this` builder for use in a chained invocation

  - ### addRequiredTags

    public final CoffeePickSearch.Builder addRequiredTags​(java.lang.String... elements)
    Adds elements to `requiredTags` set.
    Parameters:
      `elements` - An array of requiredTags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setRequiredTags

    public final CoffeePickSearch.Builder setRequiredTags​(java.lang.Iterable<java.lang.String> elements)
    Sets or replaces all elements for `requiredTags` set.
    Parameters:
      `elements` - An iterable of requiredTags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllRequiredTags

    public final CoffeePickSearch.Builder addAllRequiredTags​(java.lang.Iterable<java.lang.String> elements)
    Adds elements to `requiredTags` set.
    Parameters:
      `elements` - An iterable of requiredTags elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public CoffeePickSearch build()
    Builds a new `CoffeePickSearch`.
    Returns:
      An immutable instance of CoffeePickSearch
    Throws:
      `java.lang.IllegalStateException` - if any required attributes are missing