com.io7m.jtensors.bytebuffered

## Class VectorByteBufferedM3I

- java.lang.Object
- - com.io7m.jtensors.bytebuffered.ByteBuffered
  - - com.io7m.jtensors.bytebuffered.VectorByteBufferedM3I

- All Implemented Interfaces:
    ByteBufferedType, VectorByteBuffered3IType, Vector3IType, VectorReadable2IType, VectorReadable3IType, VectorWritable2IType, VectorWritable3IType

      public final class VectorByteBufferedM3I
      extends ByteBuffered
      implements VectorByteBuffered3IType

  A three-element vector type with `int` elements, packed into a `ByteBuffer`.

  Values of this type cannot be accessed safely from multiple threads without explicit synchronization.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `copyFrom2I(VectorReadable2IType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFrom3I(VectorReadable3IType in_v)` Set the current vector to the contents of the input vector.
    `boolean` | `equals(Object obj)`
    `int` | `getXI()`
    `int` | `getYI()`
    `int` | `getZI()`
    `int` | `hashCode()`
    `static VectorByteBuffered3IType` | `newVectorFromByteBuffer(ByteBuffer b, long byte_offset)` Return a new vector that is backed by whatever data is at byte offset `byte_offset` in the byte buffer .
    `static VectorByteBuffered3IType` | `newVectorFromByteBufferAndBase(ByteBuffer b, AtomicLong base, int offset)` Return a new vector that is backed by the given byte buffer `b`
    `void` | `set2I(int x, int y)` Set the current `x` and `y` values of the current vector.
    `void` | `set3I(int x, int y, int z)` Set the current `x`, `y` and `z` values of the current vector.
    `void` | `setXI(int x)` Set the current `x` value of the current vector.
    `void` | `setYI(int y)` Set the current `y` value of the current vector.
    `void` | `setZI(int z)` Set the current `z` value of the current vector.
    `String` | `toString()`

    - ### Methods inherited from class com.io7m.jtensors.bytebuffered.ByteBuffered

      `getByteOffset, getIndex, getOffset, setBase, setByteOffset`

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

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

    - ### Methods inherited from interface com.io7m.jtensors.bytebuffered.ByteBufferedType

      `getByteOffset, setByteOffset`

- - ### Method Detail

    - #### newVectorFromByteBuffer

          public static VectorByteBuffered3IType newVectorFromByteBuffer(ByteBuffer b,
                                                                         long byte_offset)

      Return a new vector that is backed by whatever data is at byte offset `byte_offset` in the byte buffer .

      No initialization of the data is performed.

      Parameters:
        `b` - The byte buffer
        `byte_offset` - A byte offset
      Returns:
        A new buffered vector

    - #### newVectorFromByteBufferAndBase

          public static VectorByteBuffered3IType newVectorFromByteBufferAndBase(ByteBuffer b,
                                                                                AtomicLong base,
                                                                                int offset)

      Return a new vector that is backed by the given byte buffer `b`

      The data for the instance will be taken from the data at the current value of `base.get() + offset`, each time a field is requested or set.

      No initialization of the data is performed.

      Parameters:
        `b` - The byte buffer
        `base` - The base address
        `offset` - A constant offset
      Returns:
        A new buffered vector

    - #### getZI

          public int getZI()

      Specified by:
        `getZI` in interface `VectorReadable3IType`
      Returns:
        The Z value of the given vector.

    - #### setZI

          public void setZI(int z)

      Description copied from interface: `VectorWritable3IType`
      Set the current `z` value of the current vector.
      Specified by:
        `setZI` in interface `VectorWritable3IType`
      Parameters:
        `z` - The new `z` value.

    - #### getXI

          public int getXI()

      Specified by:
        `getXI` in interface `VectorReadable2IType`
      Returns:
        The X value of the given vector.

    - #### setXI

          public void setXI(int x)

      Description copied from interface: `VectorWritable2IType`
      Set the current `x` value of the current vector.
      Specified by:
        `setXI` in interface `VectorWritable2IType`
      Parameters:
        `x` - The new `x` value.

    - #### getYI

          public int getYI()

      Specified by:
        `getYI` in interface `VectorReadable2IType`
      Returns:
        The Y value of the given vector.

    - #### setYI

          public void setYI(int y)

      Description copied from interface: `VectorWritable2IType`
      Set the current `y` value of the current vector.
      Specified by:
        `setYI` in interface `VectorWritable2IType`
      Parameters:
        `y` - The new `y` value.

    - #### copyFrom3I

          public void copyFrom3I(VectorReadable3IType in_v)

      Description copied from interface: `VectorWritable3IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom3I` in interface `VectorWritable3IType`
      Parameters:
        `in_v` - The input vector

    - #### set3I

          public void set3I(int x,
                            int y,
                            int z)

      Description copied from interface: `VectorWritable3IType`
      Set the current `x`, `y` and `z` values of the current vector.
      Specified by:
        `set3I` in interface `VectorWritable3IType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.
        `z` - The new `z` value.

    - #### copyFrom2I

          public void copyFrom2I(VectorReadable2IType in_v)

      Description copied from interface: `VectorWritable2IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom2I` in interface `VectorWritable2IType`
      Parameters:
        `in_v` - The input vector

    - #### set2I

          public void set2I(int x,
                            int y)

      Description copied from interface: `VectorWritable2IType`
      Set the current `x` and `y` values of the current vector.
      Specified by:
        `set2I` in interface `VectorWritable2IType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

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