com.io7m.smfj.core

## Class SMFTriangles

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

- All Implemented Interfaces:
    SMFTrianglesType

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

  Information about triangles in a mesh.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFTriangles.Builder` | `builder()` Creates a builder for `SMFTriangles`.
    `static SMFTriangles` | `copyOf(SMFTrianglesType instance)` Creates an immutable copy of a `SMFTrianglesType` value.
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFTriangles` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `triangleCount`, `triangleIndexSizeBits`, `triangleIndexSizeOctets`, `triangleSizeOctets`.
    `static SMFTriangles` | `of(long triangleCount, int triangleIndexSizeBits)` Construct a new immutable `SMFTriangles` instance.
    `String` | `toString()` Prints the immutable value `SMFTriangles` with attribute values.
    `long` | `triangleCount()`
    `int` | `triangleIndexSizeBits()`
    `int` | `triangleIndexSizeOctets()`
    `int` | `triangleSizeOctets()`
    `SMFTriangles` | `withTriangleCount(long value)` Copy the current immutable object by setting a value for the `triangleCount` attribute.
    `SMFTriangles` | `withTriangleIndexSizeBits(int value)` Copy the current immutable object by setting a value for the `triangleIndexSizeBits` attribute.

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

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

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

      `checkPreconditions`

- - ### Method Detail

    - #### triangleCount

          public long triangleCount()

      Specified by:
        `triangleCount` in interface `SMFTrianglesType`
      Returns:
        The number of triangles in the file

    - #### triangleIndexSizeBits

          public int triangleIndexSizeBits()

      Specified by:
        `triangleIndexSizeBits` in interface `SMFTrianglesType`
      Returns:
        The size in bits of each triangle index

    - #### triangleIndexSizeOctets

          public int triangleIndexSizeOctets()

      Specified by:
        `triangleIndexSizeOctets` in interface `SMFTrianglesType`
      Returns:
        The size in octets of each triangle index

    - #### triangleSizeOctets

          public int triangleSizeOctets()

      Specified by:
        `triangleSizeOctets` in interface `SMFTrianglesType`
      Returns:
        The size in octets of each triangle

    - #### withTriangleCount

          public final SMFTriangles withTriangleCount(long value)

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

    - #### withTriangleIndexSizeBits

          public final SMFTriangles withTriangleIndexSizeBits(int value)

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

    - #### equals

          public boolean equals(Object another)

      This instance is equal to all instances of `SMFTriangles` 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: `triangleCount`, `triangleIndexSizeBits`, `triangleIndexSizeOctets`, `triangleSizeOctets`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### of

          public static SMFTriangles of(long triangleCount,
                                        int triangleIndexSizeBits)

      Construct a new immutable `SMFTriangles` instance.
      Parameters:
        `triangleCount` - The value for the `triangleCount` attribute
        `triangleIndexSizeBits` - The value for the `triangleIndexSizeBits` attribute
      Returns:
        An immutable SMFTriangles instance

    - #### copyOf

          public static SMFTriangles copyOf(SMFTrianglesType instance)

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

    - #### builder

          public static SMFTriangles.Builder builder()

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

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