com.io7m.jpra.runtime.java

## Interface JPRACursor2DType<T>

- Type Parameters:
    `T` - The type of addressed elements
  All Superinterfaces:
    JPRACursorByteReadableType, JPRACursorType<T>
  All Known Implementing Classes:
    JPRACursor2DByteBufferedChecked, JPRACursor2DByteBufferedUnchecked

      public interface JPRACursor2DType<T>
      extends JPRACursorByteReadableType, JPRACursorType<T>

  The type of cursors that address 2D arrays of values of type `T`.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getElementX()`
    `int` | `getElementY()`
    `void` | `setElementPosition(int x, int y)` Point the cursor at element `(x, y)` of the array.

    - ### Methods inherited from interface com.io7m.jpra.runtime.java.JPRACursorByteReadableType

      `getByteOffsetObservable`

    - ### Methods inherited from interface com.io7m.jpra.runtime.java.JPRACursorType

      `getElementView`

- - ### Method Detail

    - #### getElementX

          int getElementX()

      Returns:
        The current element `x` position

    - #### getElementY

          int getElementY()

      Returns:
        The current element `y` position

    - #### setElementPosition

          void setElementPosition(int x,
                                  int y)
                           throws IndexOutOfBoundsException

      Point the cursor at element `(x, y)` of the array.

      Implementations are permitted to perform bounds checking, and must throw `IndexOutOfBoundsException` on out-of-bounds indices.

      Parameters:
        `x` - The `x` (horizontal, columns) position
        `y` - The `y` (vertical, rows) position
      Throws:
        `IndexOutOfBoundsException` - Iff the implementation performs bounds checking and the element is out of range

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