com.io7m.smfj.core

## Class SMFHeader

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

- All Implemented Interfaces:
    SMFHeaderType

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

  Information about an SMF file.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javaslang.collection.SortedMap<SMFAttributeName,SMFAttribute>` | `attributesByName()`
    `javaslang.collection.List<SMFAttribute>` | `attributesInOrder()`
    `static SMFHeader.Builder` | `builder()` Creates a builder for `SMFHeader`.
    `SMFCoordinateSystem` | `coordinateSystem()`
    `static SMFHeader` | `copyOf(SMFHeaderType instance)` Creates an immutable copy of a `SMFHeaderType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFHeader` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `triangles`, `vertexCount`, `schemaIdentifier`, `coordinateSystem`, `attributesInOrder`, `attributesByName`.
    `static SMFHeader` | `of(SMFTriangles triangles, long vertexCount, Optional<SMFSchemaIdentifier> schemaIdentifier, SMFCoordinateSystem coordinateSystem, javaslang.collection.List<SMFAttribute> attributesInOrder)` Construct a new immutable `SMFHeader` instance.
    `Optional<SMFSchemaIdentifier>` | `schemaIdentifier()`
    `String` | `toString()` Prints the immutable value `SMFHeader` with attribute values.
    `SMFTriangles` | `triangles()`
    `long` | `vertexCount()`
    `SMFHeader` | `withAttributesInOrder(javaslang.collection.List<SMFAttribute> value)`
    `SMFHeader` | `withCoordinateSystem(SMFCoordinateSystem value)` Copy the current immutable object by setting a value for the `coordinateSystem` attribute.
    `SMFHeader` | `withSchemaIdentifier(Optional<? extends SMFSchemaIdentifier> optional)` Copy the current immutable object by setting an optional value for the `schemaIdentifier` attribute.
    `SMFHeader` | `withSchemaIdentifier(SMFSchemaIdentifier value)` Copy the current immutable object by setting a present value for the optional `schemaIdentifier` attribute.
    `SMFHeader` | `withTriangles(SMFTriangles value)` Copy the current immutable object by setting a value for the `triangles` attribute.
    `SMFHeader` | `withVertexCount(long value)` Copy the current immutable object by setting a value for the `vertexCount` attribute.

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

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

    - ### Methods inherited from interface com.io7m.smfj.core.SMFHeaderType

      `checkPreconditions`

- - ### Method Detail

    - #### triangles

          public SMFTriangles triangles()

      Specified by:
        `triangles` in interface `SMFHeaderType`
      Returns:
        The triangle information for the file

    - #### vertexCount

          public long vertexCount()

      Specified by:
        `vertexCount` in interface `SMFHeaderType`
      Returns:
        The number of vertices in the file

    - #### schemaIdentifier

          public Optional<SMFSchemaIdentifier> schemaIdentifier()

      Specified by:
        `schemaIdentifier` in interface `SMFHeaderType`
      Returns:
        The schema ID in the file

    - #### coordinateSystem

          public SMFCoordinateSystem coordinateSystem()

      Specified by:
        `coordinateSystem` in interface `SMFHeaderType`
      Returns:
        The coordinate system of the mesh data

    - #### attributesInOrder

          public javaslang.collection.List<SMFAttribute> attributesInOrder()

      Specified by:
        `attributesInOrder` in interface `SMFHeaderType`
      Returns:
        The attributes in the order that they appeared in the file

    - #### attributesByName

          public javaslang.collection.SortedMap<SMFAttributeName,SMFAttribute> attributesByName()

      Specified by:
        `attributesByName` in interface `SMFHeaderType`
      Returns:
        The attributes by name

    - #### withTriangles

          public final SMFHeader withTriangles(SMFTriangles value)

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

    - #### withVertexCount

          public final SMFHeader withVertexCount(long value)

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

    - #### withSchemaIdentifier

          public final SMFHeader withSchemaIdentifier(SMFSchemaIdentifier value)

      Copy the current immutable object by setting a present value for the optional `schemaIdentifier` attribute.
      Parameters:
        `value` - The value for schemaIdentifier
      Returns:
        A modified copy of `this` object

    - #### withSchemaIdentifier

          public final SMFHeader withSchemaIdentifier(Optional<? extends SMFSchemaIdentifier> optional)

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

    - #### withCoordinateSystem

          public final SMFHeader withCoordinateSystem(SMFCoordinateSystem value)

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

    - #### withAttributesInOrder

          public SMFHeader withAttributesInOrder(javaslang.collection.List<SMFAttribute> value)

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `SMFHeader` 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: `triangles`, `vertexCount`, `schemaIdentifier`, `coordinateSystem`, `attributesInOrder`, `attributesByName`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### of

          public static SMFHeader of(SMFTriangles triangles,
                                     long vertexCount,
                                     Optional<SMFSchemaIdentifier> schemaIdentifier,
                                     SMFCoordinateSystem coordinateSystem,
                                     javaslang.collection.List<SMFAttribute> attributesInOrder)

      Construct a new immutable `SMFHeader` instance.
      Parameters:
        `triangles` - The value for the `triangles` attribute
        `vertexCount` - The value for the `vertexCount` attribute
        `schemaIdentifier` - The value for the `schemaIdentifier` attribute
        `coordinateSystem` - The value for the `coordinateSystem` attribute
        `attributesInOrder` - The value for the `attributesInOrder` attribute
      Returns:
        An immutable SMFHeader instance

    - #### copyOf

          public static SMFHeader copyOf(SMFHeaderType instance)

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

    - #### builder

          public static SMFHeader.Builder builder()

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

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