public final class VectorByteBufferedM2I extends Object implements VectorByteBuffered2IType
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.
| Modifier and Type | Method and Description |
|---|---|
void |
copyFrom2I(VectorReadable2IType in_v)
Set the current vector to the contents of the input vector.
|
boolean |
equals(Object obj) |
long |
getByteOffset() |
int |
getXI() |
int |
getYI() |
int |
hashCode() |
static VectorByteBuffered2IType |
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 . |
void |
set2I(int x,
int y)
Set the current
x and y values of the current vector. |
void |
setByteOffset(long b)
Set the base byte offset of this value.
|
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. |
String |
toString() |
public static VectorByteBuffered2IType 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.
b - The byte bufferbyte_offset - A byte offsetpublic int getXI()
getXI in interface VectorReadable2ITypepublic void setXI(int x)
VectorWritable2ITypex value of the current vector.setXI in interface VectorWritable2ITypex - The new x value.public int getYI()
getYI in interface VectorReadable2ITypepublic void setYI(int y)
VectorWritable2ITypey value of the current vector.setYI in interface VectorWritable2ITypey - The new y value.public void copyFrom2I(VectorReadable2IType in_v)
VectorWritable2ITypecopyFrom2I in interface VectorWritable2ITypein_v - The input vectorpublic void set2I(int x,
int y)
VectorWritable2ITypex and y values of the current vector.set2I in interface VectorWritable2ITypex - The new x value.y - The new y value.public long getByteOffset()
getByteOffset in interface ByteBufferedTypepublic void setByteOffset(long b)
ByteBufferedTypeSet the base byte offset of this value.
Must be non-negative.
setByteOffset in interface ByteBufferedTypeb - The offset in bytesCopyright © 2015 <code@io7m.com> http://io7m.com