com.io7m.smfj.core

## Class SMFHeader.Builder

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

- Enclosing class:
    SMFHeader

      public static final class SMFHeader.Builder
      extends Object

  Builds instances of type `SMFHeader`. 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
    --- | ---
    `SMFHeader.Builder` | `addAllAttributesInOrder(Iterable<SMFAttribute> element)`
    `SMFHeader.Builder` | `addAttributesInOrder(SMFAttribute element)`
    `SMFHeader` | `build()` Builds a new `SMFHeader`.
    `SMFHeader.Builder` | `from(SMFHeaderType instance)` Fill a builder with attribute values from the provided `SMFHeaderType` instance.
    `SMFHeader.Builder` | `setAttributesInOrder(javaslang.collection.List<SMFAttribute> elements)`
    `SMFHeader.Builder` | `setCoordinateSystem(SMFCoordinateSystem coordinateSystem)` Initializes the value for the `coordinateSystem` attribute.
    `SMFHeader.Builder` | `setIterableAttributesInOrder(Iterable<SMFAttribute> elements)`
    `SMFHeader.Builder` | `setSchemaIdentifier(Optional<? extends SMFSchemaIdentifier> schemaIdentifier)` Initializes the optional value `schemaIdentifier` to schemaIdentifier.
    `SMFHeader.Builder` | `setSchemaIdentifier(SMFSchemaIdentifier schemaIdentifier)` Initializes the optional value `schemaIdentifier` to schemaIdentifier.
    `SMFHeader.Builder` | `setTriangles(SMFTriangles triangles)` Initializes the value for the `triangles` attribute.
    `SMFHeader.Builder` | `setVertexCount(long vertexCount)` Initializes the value for the `vertexCount` attribute.

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

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

- - ### Method Detail

    - #### from

          public final SMFHeader.Builder from(SMFHeaderType instance)

      Fill a builder with attribute values from the provided `SMFHeaderType` 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

    - #### setTriangles

          public final SMFHeader.Builder setTriangles(SMFTriangles triangles)

      Initializes the value for the `triangles` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `triangles`.

      Parameters:
        `triangles` - The value for triangles
      Returns:
        `this` builder for use in a chained invocation

    - #### setVertexCount

          public final SMFHeader.Builder setVertexCount(long vertexCount)

      Initializes the value for the `vertexCount` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `vertexCount`.

      Parameters:
        `vertexCount` - The value for vertexCount
      Returns:
        `this` builder for use in a chained invocation

    - #### setSchemaIdentifier

          public final SMFHeader.Builder setSchemaIdentifier(SMFSchemaIdentifier schemaIdentifier)

      Initializes the optional value `schemaIdentifier` to schemaIdentifier.
      Parameters:
        `schemaIdentifier` - The value for schemaIdentifier
      Returns:
        `this` builder for chained invocation

    - #### setSchemaIdentifier

          public final SMFHeader.Builder setSchemaIdentifier(Optional<? extends SMFSchemaIdentifier> schemaIdentifier)

      Initializes the optional value `schemaIdentifier` to schemaIdentifier.
      Parameters:
        `schemaIdentifier` - The value for schemaIdentifier
      Returns:
        `this` builder for use in a chained invocation

    - #### setCoordinateSystem

          public final SMFHeader.Builder setCoordinateSystem(SMFCoordinateSystem coordinateSystem)

      Initializes the value for the `coordinateSystem` attribute.

      If not set, this attribute will have a default value as returned by the initializer of `coordinateSystem`.

      Parameters:
        `coordinateSystem` - The value for coordinateSystem
      Returns:
        `this` builder for use in a chained invocation

    - #### addAttributesInOrder

          public SMFHeader.Builder addAttributesInOrder(SMFAttribute element)

    - #### addAllAttributesInOrder

          public SMFHeader.Builder addAllAttributesInOrder(Iterable<SMFAttribute> element)

    - #### setAttributesInOrder

          public SMFHeader.Builder setAttributesInOrder(javaslang.collection.List<SMFAttribute> elements)

    - #### setIterableAttributesInOrder

          public SMFHeader.Builder setIterableAttributesInOrder(Iterable<SMFAttribute> elements)

    - #### build

          public SMFHeader build()

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

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