T - The type of addressed valuespublic final class JPRACursor2DByteBufferedUnchecked<T extends JPRAValueType> extends Object implements JPRACursor2DType<T>
ByteBuffer
and does not perform bounds checking.| Modifier and Type | Method and Description |
|---|---|
AtomicLong |
getByteOffsetObservable() |
T |
getElementView() |
int |
getElementX() |
int |
getElementY() |
static <T extends JPRAValueType> |
newCursor(ByteBuffer in_buffer,
int width,
int height,
JPRAValueByteBufferedConstructorType<T> in_cons)
Construct a new cursor, assuming that the given buffer contains a
width * height region of elements of type T. |
void |
setElementPosition(int in_x,
int in_y)
Point the cursor at element
(x, y) of the array. |
String |
toString() |
public static <T extends JPRAValueType> JPRACursor2DType<T> newCursor(ByteBuffer in_buffer, int width, int height, JPRAValueByteBufferedConstructorType<T> in_cons)
width * height region of elements of type T.T - The precise type of elementsin_buffer - The byte bufferwidth - The width of the regionheight - The height of the regionin_cons - An element value constructorpublic T getElementView()
getElementView in interface JPRACursorType<T extends JPRAValueType>public AtomicLong getByteOffsetObservable()
getByteOffsetObservable in interface JPRACursorByteReadableTypepublic int getElementX()
getElementX in interface JPRACursor2DType<T extends JPRAValueType>x positionpublic int getElementY()
getElementY in interface JPRACursor2DType<T extends JPRAValueType>y positionpublic void setElementPosition(int in_x,
int in_y)
throws IndexOutOfBoundsException
JPRACursor2DTypePoint 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.
setElementPosition in interface JPRACursor2DType<T extends JPRAValueType>in_x - The x (horizontal, columns) positionin_y - The y (vertical, rows) positionIndexOutOfBoundsException - Iff the implementation performs bounds
checking and the element is out of rangeCopyright © 2015 <code@io7m.com> http://io7m.com