com.io7m.smfj.bytebuffer

## Class SMFByteBufferPackedTriangles

- java.lang.Object
- - com.io7m.smfj.bytebuffer.SMFByteBufferPackedTriangles

- All Implemented Interfaces:
    SMFByteBufferPackedTrianglesType

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

  A set of triangles packed into a byte buffer.

- - ### Nested Class Summary

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static SMFByteBufferPackedTriangles.Builder` | `builder()` Creates a builder for `SMFByteBufferPackedTriangles`.
    `ByteBuffer` | `byteBuffer()`
    `static SMFByteBufferPackedTriangles` | `copyOf(SMFByteBufferPackedTrianglesType instance)` Creates an immutable copy of a `SMFByteBufferPackedTrianglesType` value.
    `com.io7m.jpra.runtime.java.JPRACursor1DType<SMFByteBufferIntegerUnsigned3Type>` | `cursor()`
    `boolean` | `equals(Object another)` This instance is equal to all instances of `SMFByteBufferPackedTriangles` that have equal attribute values.
    `int` | `hashCode()` Computes a hash code from attributes: `byteBuffer`, `triangleCount`, `triangleIndexSizeBits`.
    `static SMFByteBufferPackedTriangles` | `of(ByteBuffer byteBuffer, long triangleCount, int triangleIndexSizeBits)` Construct a new immutable `SMFByteBufferPackedTriangles` instance.
    `String` | `toString()` Prints the immutable value `SMFByteBufferPackedTriangles` with attribute values.
    `long` | `triangleCount()`
    `int` | `triangleIndexSizeBits()`
    `int` | `triangleIndexSizeOctets()`
    `int` | `triangleSizeBits()`
    `int` | `triangleSizeOctets()`
    `SMFByteBufferPackedTriangles` | `withByteBuffer(ByteBuffer value)` Copy the current immutable object by setting a value for the `byteBuffer` attribute.
    `SMFByteBufferPackedTriangles` | `withTriangleCount(long value)` Copy the current immutable object by setting a value for the `triangleCount` attribute.
    `SMFByteBufferPackedTriangles` | `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.bytebuffer.SMFByteBufferPackedTrianglesType

      `checkPreconditions`

- - ### Method Detail

    - #### byteBuffer

          public ByteBuffer byteBuffer()

      Specified by:
        `byteBuffer` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        The byte buffer

    - #### triangleCount

          public long triangleCount()

      Specified by:
        `triangleCount` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        The number of triangles present

    - #### triangleIndexSizeBits

          public int triangleIndexSizeBits()

      Specified by:
        `triangleIndexSizeBits` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        The size in bits of a single triangle index

    - #### withByteBuffer

          public final SMFByteBufferPackedTriangles withByteBuffer(ByteBuffer value)

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

    - #### withTriangleCount

          public final SMFByteBufferPackedTriangles 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 SMFByteBufferPackedTriangles 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 `SMFByteBufferPackedTriangles` 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: `byteBuffer`, `triangleCount`, `triangleIndexSizeBits`.
      Overrides:
        `hashCode` in class `Object`
      Returns:
        hashCode value

    - #### toString

          public String toString()

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

    - #### triangleIndexSizeOctets

          public int triangleIndexSizeOctets()

      Returns a lazily initialized value of the `triangleIndexSizeOctets` attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
        `triangleIndexSizeOctets` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        A lazily initialized value of the `l.name` attribute

    - #### triangleSizeBits

          public int triangleSizeBits()

      Returns a lazily initialized value of the `triangleSizeBits` attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
        `triangleSizeBits` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        A lazily initialized value of the `l.name` attribute

    - #### triangleSizeOctets

          public int triangleSizeOctets()

      Returns a lazily initialized value of the `triangleSizeOctets` attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
        `triangleSizeOctets` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        A lazily initialized value of the `l.name` attribute

    - #### cursor

          public com.io7m.jpra.runtime.java.JPRACursor1DType<SMFByteBufferIntegerUnsigned3Type> cursor()

      Returns a lazily initialized value of the `cursor` attribute. Initialized once and only once and stored for subsequent access with proper synchronization.

      Specified by:
        `cursor` in interface `SMFByteBufferPackedTrianglesType`
      Returns:
        A lazily initialized value of the `l.name` attribute

    - #### of

          public static SMFByteBufferPackedTriangles of(ByteBuffer byteBuffer,
                                                        long triangleCount,
                                                        int triangleIndexSizeBits)

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

    - #### copyOf

          public static SMFByteBufferPackedTriangles copyOf(SMFByteBufferPackedTrianglesType instance)

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

    - #### builder

          public static SMFByteBufferPackedTriangles.Builder builder()

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

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