com.io7m.jtensors.bytebuffered

## Class VectorByteBufferedM3L

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

- All Implemented Interfaces:
    ByteBufferedType, VectorByteBuffered2LType, VectorByteBuffered3LType, Vector2LType, Vector3LType, VectorReadable2LType, VectorReadable3LType, VectorWritable2LType, VectorWritable3LType

      public final class VectorByteBufferedM3L
      extends ByteBuffered
      implements VectorByteBuffered3LType

  A three-element vector type with `long` 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` | `copyFrom2L(VectorReadable2LType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFrom3L(VectorReadable3LType in_v)` Set the current vector to the contents of the input vector.
    `boolean` | `equals(Object obj)`
    `long` | `getXL()`
    `long` | `getYL()`
    `long` | `getZL()`
    `int` | `hashCode()`
    `static VectorByteBuffered3LType` | `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 VectorByteBuffered3LType` | `newVectorFromByteBufferAndBase(ByteBuffer b, AtomicLong base, int offset)` Return a new vector that is backed by the given byte buffer `b`
    `void` | `set2L(long x, long y)` Set the current `x` and `y` values of the current vector.
    `void` | `set3L(long x, long y, long z)` Set the current `x`, `y` and `z` values of the current vector.
    `void` | `setXL(long x)` Set the current `x` value of the current vector.
    `void` | `setYL(long y)` Set the current `y` value of the current vector.
    `void` | `setZL(long 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 VectorByteBuffered3LType 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 VectorByteBuffered3LType 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

    - #### getZL

          public long getZL()

      Specified by:
        `getZL` in interface `VectorReadable3LType`
      Returns:
        The Z value of the given vector.

    - #### setZL

          public void setZL(long z)

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

    - #### getXL

          public long getXL()

      Specified by:
        `getXL` in interface `VectorReadable2LType`
      Returns:
        The X value of the given vector.

    - #### setXL

          public void setXL(long x)

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

    - #### getYL

          public long getYL()

      Specified by:
        `getYL` in interface `VectorReadable2LType`
      Returns:
        The Y value of the given vector.

    - #### setYL

          public void setYL(long y)

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

    - #### copyFrom3L

          public void copyFrom3L(VectorReadable3LType in_v)

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

    - #### set3L

          public void set3L(long x,
                            long y,
                            long z)

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

    - #### copyFrom2L

          public void copyFrom2L(VectorReadable2LType in_v)

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

    - #### set2L

          public void set2L(long x,
                            long y)

      Description copied from interface: `VectorWritable2LType`
      Set the current `x` and `y` values of the current vector.
      Specified by:
        `set2L` in interface `VectorWritable2LType`
      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 © 2016 <code@io7m.com> http://io7m.com