com.io7m.smfj.processing.api

## Class SMFMemoryMesh.Builder

- java.lang.Object
- - com.io7m.smfj.processing.api.SMFMemoryMesh.Builder

- Enclosing class:
    SMFMemoryMesh

      public static final class SMFMemoryMesh.Builder
      extends Object

  Builds instances of type `SMFMemoryMesh`. 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
    --- | ---
    `SMFMemoryMesh.Builder` | `addAllMetadata(Iterable<SMFMetadata> element)`
    `SMFMemoryMesh.Builder` | `addAllTriangles(Iterable<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> element)`
    `SMFMemoryMesh.Builder` | `addMetadata(SMFMetadata element)`
    `SMFMemoryMesh.Builder` | `addTriangles(com.io7m.jtensors.core.unparameterized.vectors.Vector3L element)`
    `SMFMemoryMesh` | `build()` Builds a new `SMFMemoryMesh`.
    `SMFMemoryMesh.Builder` | `from(SMFMemoryMeshType instance)` Fill a builder with attribute values from the provided `SMFMemoryMeshType` instance.
    `SMFMemoryMesh.Builder` | `putArrays(SMFAttributeName key, SMFAttributeArrayType value)`
    `SMFMemoryMesh.Builder` | `putEntryArrays(javaslang.Tuple2<SMFAttributeName,SMFAttributeArrayType> entry)`
    `SMFMemoryMesh.Builder` | `setArrays(javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> elements)`
    `SMFMemoryMesh.Builder` | `setEntriesArrays(Iterable<javaslang.Tuple2<SMFAttributeName,SMFAttributeArrayType>> entries)`
    `SMFMemoryMesh.Builder` | `setHeader(SMFHeader header)` Initializes the value for the `header` attribute.
    `SMFMemoryMesh.Builder` | `setIterableMetadata(Iterable<SMFMetadata> elements)`
    `SMFMemoryMesh.Builder` | `setIterableTriangles(Iterable<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> elements)`
    `SMFMemoryMesh.Builder` | `setJavaMapArrays(Map<SMFAttributeName,SMFAttributeArrayType> in_map)`
    `SMFMemoryMesh.Builder` | `setMetadata(javaslang.collection.Vector<SMFMetadata> elements)`
    `SMFMemoryMesh.Builder` | `setTriangles(javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> elements)`

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

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

- - ### Method Detail

    - #### from

          public final SMFMemoryMesh.Builder from(SMFMemoryMeshType instance)

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

    - #### setHeader

          public final SMFMemoryMesh.Builder setHeader(SMFHeader header)

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

    - #### putArrays

          public SMFMemoryMesh.Builder putArrays(SMFAttributeName key,
                                                 SMFAttributeArrayType value)

    - #### putEntryArrays

          public SMFMemoryMesh.Builder putEntryArrays(javaslang.Tuple2<SMFAttributeName,SMFAttributeArrayType> entry)

    - #### setArrays

          public SMFMemoryMesh.Builder setArrays(javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> elements)

    - #### setJavaMapArrays

          public SMFMemoryMesh.Builder setJavaMapArrays(Map<SMFAttributeName,SMFAttributeArrayType> in_map)

    - #### setEntriesArrays

          public SMFMemoryMesh.Builder setEntriesArrays(Iterable<javaslang.Tuple2<SMFAttributeName,SMFAttributeArrayType>> entries)

    - #### addMetadata

          public SMFMemoryMesh.Builder addMetadata(SMFMetadata element)

    - #### addAllMetadata

          public SMFMemoryMesh.Builder addAllMetadata(Iterable<SMFMetadata> element)

    - #### setMetadata

          public SMFMemoryMesh.Builder setMetadata(javaslang.collection.Vector<SMFMetadata> elements)

    - #### setIterableMetadata

          public SMFMemoryMesh.Builder setIterableMetadata(Iterable<SMFMetadata> elements)

    - #### addTriangles

          public SMFMemoryMesh.Builder addTriangles(com.io7m.jtensors.core.unparameterized.vectors.Vector3L element)

    - #### addAllTriangles

          public SMFMemoryMesh.Builder addAllTriangles(Iterable<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> element)

    - #### setTriangles

          public SMFMemoryMesh.Builder setTriangles(javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> elements)

    - #### setIterableTriangles

          public SMFMemoryMesh.Builder setIterableTriangles(Iterable<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> elements)

    - #### build

          public SMFMemoryMesh build()

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

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