com.io7m.smfj.processing.api

## Class SMFMemoryMesh

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

- All Implemented Interfaces:
    SMFMemoryMeshType

      @Generated(value={"Immutables.generator","SMFMemoryMeshType"})
      public final class SMFMemoryMesh
      extends Object
      implements SMFMemoryMeshType

  An immutable in-memory copy of a mesh.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType>` | `arrays()`
    `static SMFMemoryMesh.Builder` | `builder()` Creates a builder for `SMFMemoryMesh`.
    `static SMFMemoryMesh` | `copyOf(SMFMemoryMeshType instance)` Creates an immutable copy of a `SMFMemoryMeshType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFMemoryMesh` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `header`, `arrays`, `metadata`, `triangles`.
    `SMFHeader` | `header()`
    `javaslang.collection.Vector<SMFMetadata>` | `metadata()`
    `static SMFMemoryMesh` | `of(SMFHeader header, javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> arrays, javaslang.collection.Vector<SMFMetadata> metadata, javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> triangles)` Construct a new immutable `SMFMemoryMesh` instance.
    `String` | `toString()` Prints the immutable value `SMFMemoryMesh` with attribute values.
    `javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L>` | `triangles()`
    `SMFMemoryMesh` | `withArrays(javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> value)`
    `SMFMemoryMesh` | `withHeader(SMFHeader value)` Copy the current immutable object by setting a value for the `header` attribute.
    `SMFMemoryMesh` | `withMetadata(javaslang.collection.Vector<SMFMetadata> value)`
    `SMFMemoryMesh` | `withTriangles(javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> value)`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.io7m.smfj.processing.api.SMFMemoryMeshType

      `checkPreconditions`

- - ### Method Detail

    - #### header

          public SMFHeader header()

      Specified by:
        `header` in interface `SMFMemoryMeshType`
      Returns:
        The mesh header

    - #### arrays

          public javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> arrays()

      Specified by:
        `arrays` in interface `SMFMemoryMeshType`
      Returns:
        The mesh attribute arrays

    - #### metadata

          public javaslang.collection.Vector<SMFMetadata> metadata()

      Specified by:
        `metadata` in interface `SMFMemoryMeshType`
      Returns:
        The parsed metadata

    - #### triangles

          public javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> triangles()

      Specified by:
        `triangles` in interface `SMFMemoryMeshType`
      Returns:
        The triangles

    - #### withHeader

          public final SMFMemoryMesh withHeader(SMFHeader value)

      Copy the current immutable object by setting a value for the `header` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
      Parameters:
        `value` - A new value for header
      Returns:
        A modified copy of the `this` object

    - #### withArrays

          public SMFMemoryMesh withArrays(javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> value)

    - #### withMetadata

          public SMFMemoryMesh withMetadata(javaslang.collection.Vector<SMFMetadata> value)

    - #### withTriangles

          public SMFMemoryMesh withTriangles(javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> value)

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `SMFMemoryMesh` that have equal attribute values.
      Overrides:
        `equals` in class `Object`
      Returns:
        `true` if `this` is equal to `another` instance

    - #### hashCode

          public int hashCode()

      Computes a hash code from attributes: `header`, `arrays`, `metadata`, `triangles`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

      Prints the immutable value `SMFMemoryMesh` with attribute values.
      Overrides:
        `toString` in class `Object`
      Returns:
        A string representation of the value

    - #### of

          public static SMFMemoryMesh of(SMFHeader header,
                                         javaslang.collection.Map<SMFAttributeName,SMFAttributeArrayType> arrays,
                                         javaslang.collection.Vector<SMFMetadata> metadata,
                                         javaslang.collection.Vector<com.io7m.jtensors.core.unparameterized.vectors.Vector3L> triangles)

      Construct a new immutable `SMFMemoryMesh` instance.
      Parameters:
        `header` - The value for the `header` attribute
        `arrays` - The value for the `arrays` attribute
        `metadata` - The value for the `metadata` attribute
        `triangles` - The value for the `triangles` attribute
      Returns:
        An immutable SMFMemoryMesh instance

    - #### copyOf

          public static SMFMemoryMesh copyOf(SMFMemoryMeshType instance)

      Creates an immutable copy of a `SMFMemoryMeshType` 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 SMFMemoryMesh instance

    - #### builder

          public static SMFMemoryMesh.Builder builder()

      Creates a builder for `SMFMemoryMesh`.
      Returns:
        A new SMFMemoryMesh builder

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