com.io7m.jtensors.bytebuffered.parameterized

## Class PVectorByteBufferedM4I<T>

- java.lang.Object
- - com.io7m.jtensors.bytebuffered.ByteBuffered
  - - com.io7m.jtensors.bytebuffered.parameterized.PVectorByteBufferedM4I<T>

- Type Parameters:
    `T` - A phantom type parameter
  All Implemented Interfaces:
    ByteBufferedType, PVectorByteBuffered2IType<T>, PVectorByteBuffered3IType<T>, PVectorByteBuffered4IType<T>, PVector2IType<T>, PVector3IType<T>, PVector4IType<T>, PVectorReadable2IType<T>, PVectorReadable3IType<T>, PVectorReadable4IType<T>, PVectorWritable2IType<T>, PVectorWritable3IType<T>, PVectorWritable4IType<T>, Vector2IType, Vector3IType, Vector4IType, VectorReadable2IType, VectorReadable3IType, VectorReadable4IType, VectorWritable2IType, VectorWritable3IType, VectorWritable4IType

      public final class PVectorByteBufferedM4I<T>
      extends ByteBuffered
      implements PVectorByteBuffered4IType<T>

  A four-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.
    `void` | `copyFrom4I(VectorReadable4IType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped2I(PVectorReadable2IType<T> in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped3I(PVectorReadable3IType<T> in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped4I(PVectorReadable4IType<T> in_v)` Set the current vector to the contents of the input vector.
    `boolean` | `equals(Object obj)`
    `int` | `getWI()`
    `int` | `getXI()`
    `int` | `getYI()`
    `int` | `getZI()`
    `int` | `hashCode()`
    `static <T> PVectorByteBuffered4IType<T>` | `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 <T> PVectorByteBuffered4IType<T>` | `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` | `set4I(int x, int y, int z, int w)` Set the current `x`, `y`, `z` and `w` values of the current vector.
    `void` | `setWI(int w)` Set the current `w` value 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 <T> PVectorByteBuffered4IType<T> 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.

      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `b` - The byte buffer
        `byte_offset` - A byte offset
      Returns:
        A new buffered vector

    - #### newVectorFromByteBufferAndBase

          public static <T> PVectorByteBuffered4IType<T> 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.

      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `b` - The byte buffer
        `base` - The base address
        `offset` - A constant offset
      Returns:
        A new buffered vector

    - #### getWI

          public int getWI()

      Specified by:
        `getWI` in interface `VectorReadable4IType`
      Returns:
        The W value of the given vector.

    - #### setWI

          public void setWI(int w)

      Description copied from interface: `VectorWritable4IType`
      Set the current `w` value of the current vector.
      Specified by:
        `setWI` in interface `VectorWritable4IType`
      Parameters:
        `w` - The new `w` value.

    - #### 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.

    - #### copyFrom4I

          public void copyFrom4I(VectorReadable4IType in_v)

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

    - #### set4I

          public void set4I(int x,
                            int y,
                            int z,
                            int w)

      Description copied from interface: `VectorWritable4IType`
      Set the current `x`, `y`, `z` and `w` values of the current vector.
      Specified by:
        `set4I` in interface `VectorWritable4IType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.
        `z` - The new `z` value.
        `w` - The new `w` 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`

    - #### copyFromTyped4I

          public void copyFromTyped4I(PVectorReadable4IType<T> in_v)

      Description copied from interface: `PVectorWritable4IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped4I` in interface `PVectorWritable4IType<T>`
      Parameters:
        `in_v` - The input vector

    - #### copyFromTyped3I

          public void copyFromTyped3I(PVectorReadable3IType<T> in_v)

      Description copied from interface: `PVectorWritable3IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped3I` in interface `PVectorWritable3IType<T>`
      Parameters:
        `in_v` - The input vector

    - #### copyFromTyped2I

          public void copyFromTyped2I(PVectorReadable2IType<T> in_v)

      Description copied from interface: `PVectorWritable2IType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped2I` in interface `PVectorWritable2IType<T>`
      Parameters:
        `in_v` - The input vector

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