com.io7m.smfj.core

## Class SMFFormatDescription.Builder

- java.lang.Object
- - com.io7m.smfj.core.SMFFormatDescription.Builder

- Enclosing class:
    SMFFormatDescription

      public static final class SMFFormatDescription.Builder
      extends Object

  Builds instances of type `SMFFormatDescription`. 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

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SMFFormatDescription` | `build()` Builds a new `SMFFormatDescription`.
    `SMFFormatDescription.Builder` | `from(SMFFormatDescriptionType instance)` Fill a builder with attribute values from the provided `SMFFormatDescriptionType` instance.
    `SMFFormatDescription.Builder` | `setDescription(String description)` Initializes the value for the `description` attribute.
    `SMFFormatDescription.Builder` | `setMimeType(String mimeType)` Initializes the value for the `mimeType` attribute.
    `SMFFormatDescription.Builder` | `setName(String name)` Initializes the value for the `name` attribute.
    `SMFFormatDescription.Builder` | `setRandomAccess(boolean randomAccess)` Initializes the value for the `randomAccess` attribute.
    `SMFFormatDescription.Builder` | `setSuffix(String suffix)` Initializes the value for the `suffix` attribute.

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

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

- - ### Method Detail

    - #### from

          public final SMFFormatDescription.Builder from(SMFFormatDescriptionType instance)

      Fill a builder with attribute values from the provided `SMFFormatDescriptionType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
      Parameters:
        `instance` - The instance from which to copy values
      Returns:
        `this` builder for use in a chained invocation

    - #### setDescription

          public final SMFFormatDescription.Builder setDescription(String description)

      Initializes the value for the `description` attribute.
      Parameters:
        `description` - The value for description
      Returns:
        `this` builder for use in a chained invocation

    - #### setSuffix

          public final SMFFormatDescription.Builder setSuffix(String suffix)

      Initializes the value for the `suffix` attribute.
      Parameters:
        `suffix` - The value for suffix
      Returns:
        `this` builder for use in a chained invocation

    - #### setMimeType

          public final SMFFormatDescription.Builder setMimeType(String mimeType)

      Initializes the value for the `mimeType` attribute.
      Parameters:
        `mimeType` - The value for mimeType
      Returns:
        `this` builder for use in a chained invocation

    - #### setName

          public final SMFFormatDescription.Builder setName(String name)

      Initializes the value for the `name` attribute.
      Parameters:
        `name` - The value for name
      Returns:
        `this` builder for use in a chained invocation

    - #### setRandomAccess

          public final SMFFormatDescription.Builder setRandomAccess(boolean randomAccess)

      Initializes the value for the `randomAccess` attribute.
      Parameters:
        `randomAccess` - The value for randomAccess
      Returns:
        `this` builder for use in a chained invocation

    - #### build

          public SMFFormatDescription build()

      Builds a new `SMFFormatDescription`.
      Returns:
        An immutable instance of SMFFormatDescription
      Throws:
        `IllegalStateException` - if any required attributes are missing

Copyright © 2017 <code@io7m.com> http://io7m.com