com.io7m.jcanephora.cursors

## Class JCGLR8ByteBuffered

- java.lang.Object
- - com.io7m.jcanephora.cursors.JCGLR8ByteBuffered

- All Implemented Interfaces:
    JCGLR8ReadableType, JCGLR8Type, JCGLR8WritableType, com.io7m.jpra.runtime.java.JPRAValueType

      public final class JCGLR8ByteBuffered
      extends Object
      implements JCGLR8Type

  A `ByteBuffer` based implementation of the `JCGLR8` packed type.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `double` | `getR()`
    `int` | `getRRaw()`
    `static JCGLR8Type` | `newValue(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)` Construct a view of a type.
    `static JCGLR8Type` | `newValueWithOffset(ByteBuffer in_buffer, com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer, int in_base_offset)` Construct a view of a type.
    `void` | `set(double r)` Set the value of all fields.
    `void` | `setR(double x)` Set the value of the `r` field.
    `void` | `setRRaw(int x)` Set the value of the `r` field.
    `static int` | `sizeInOctets()`
    `int` | `sizeOctets()`

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

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

- - ### Method Detail

    - #### newValueWithOffset

          public static JCGLR8Type newValueWithOffset(ByteBuffer in_buffer,
                                                      com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer,
                                                      int in_base_offset)

      Construct a view of a type.
      Parameters:
        `in_buffer` - A byte buffer
        `in_pointer` - A cursor
        `in_base_offset` - The base offset from the cursor
      Returns:
        A view of a type

    - #### newValue

          public static JCGLR8Type newValue(ByteBuffer in_buffer,
                                            com.io7m.jpra.runtime.java.JPRACursorByteReadableType in_pointer)

      Construct a view of a type.
      Parameters:
        `in_buffer` - A byte buffer
        `in_pointer` - A cursor
      Returns:
        A view of a type

    - #### sizeOctets

          public int sizeOctets()

      Specified by:
        `sizeOctets` in interface `com.io7m.jpra.runtime.java.JPRAValueType`

    - #### sizeInOctets

          public static int sizeInOctets()

      Returns:
        The size of the type in octets

    - #### getRRaw

          public int getRRaw()

      Specified by:
        `getRRaw` in interface `JCGLR8ReadableType`
      Returns:
        The value of the `r` field

    - #### setRRaw

          public void setRRaw(int x)

      Description copied from interface: `JCGLR8WritableType`
      Set the value of the `r` field. The 8 least significant bits of `x` will be used.
      Specified by:
        `setRRaw` in interface `JCGLR8WritableType`
      Parameters:
        `x` - The new value

    - #### getR

          public double getR()

      Specified by:
        `getR` in interface `JCGLR8ReadableType`
      Returns:
        The value of the `r` field

    - #### setR

          public void setR(double x)

      Description copied from interface: `JCGLR8WritableType`
      Set the value of the `r` field.
      Specified by:
        `setR` in interface `JCGLR8WritableType`
      Parameters:
        `x` - The new value (in the range `[0, 1]`)

    - #### set

          public void set(double r)

      Description copied from interface: `JCGLR8WritableType`
      Set the value of all fields.
      Specified by:
        `set` in interface `JCGLR8WritableType`
      Parameters:
        `r` - The value for field `r`

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