public class DoubleBuffer extends BaseDataBuffer
DataBuffer.AllocationMode, DataBuffer.Type
allocationMode, dataBuffer, doubleData, elementSize, floatData, intData, isPersist, length, ref, referencing
Constructor and Description |
---|
DoubleBuffer(io.netty.buffer.ByteBuf buf,
int length) |
DoubleBuffer(double[] data) |
DoubleBuffer(double[] doubles,
boolean copy) |
DoubleBuffer(float[] data) |
DoubleBuffer(float[] data,
boolean copyOnOps) |
DoubleBuffer(int length) |
DoubleBuffer(int[] data) |
DoubleBuffer(int[] data,
boolean copyOnOps) |
Modifier and Type | Method and Description |
---|---|
DataBuffer |
create(io.netty.buffer.ByteBuf buf,
int length)
Create the data buffer
with respect to the given byte buffer
|
DataBuffer |
create(double[] data)
Create the data buffer
with respect to the given byte buffer
|
DataBuffer |
create(float[] data)
Create the data buffer
with respect to the given byte buffer
|
protected DataBuffer |
create(int length)
Create with length
|
DataBuffer |
create(int[] data)
Create the data buffer
with respect to the given byte buffer
|
DataBuffer.Type |
dataType()
The data type of the buffer
|
void |
flush()
Flush the data buffer
|
int |
getElementSize()
The number of bytes for each individual element
|
float |
getFloat(int i)
Get element i in the buffer as a double
|
Number |
getNumber(int i)
Get element i in the buffer as a double
|
addReferencing, allocationMode, asBytes, asDouble, asFloat, asInt, asNetty, asNio, asNioDouble, asNioFloat, assign, assign, assign, assign, assign, assign, assign, assign, assign, assign, destroy, dup, ensureWritable, equals, getComplex, getComplexDouble, getComplexFloat, getDouble, getDoublesAt, getDoublesAt, getFloatsAt, getFloatsAt, getInt, hashCode, isPersist, length, persist, put, put, put, put, references, removeReferencing, setData, setData, setData, toString, unPersist
public DoubleBuffer(int length)
public DoubleBuffer(io.netty.buffer.ByteBuf buf, int length)
public DoubleBuffer(double[] data)
public DoubleBuffer(int[] data)
public DoubleBuffer(int[] data, boolean copyOnOps)
public DoubleBuffer(float[] data)
public DoubleBuffer(float[] data, boolean copyOnOps)
public DoubleBuffer(double[] doubles, boolean copy)
public DataBuffer create(io.netty.buffer.ByteBuf buf, int length)
BaseDataBuffer
create
in class BaseDataBuffer
buf
- the buffer to createpublic DataBuffer.Type dataType()
DataBuffer
public float getFloat(int i)
DataBuffer
getFloat
in interface DataBuffer
getFloat
in class BaseDataBuffer
i
- the element to getFloatpublic Number getNumber(int i)
DataBuffer
getNumber
in interface DataBuffer
getNumber
in class BaseDataBuffer
i
- the element to getFloatpublic DataBuffer create(double[] data)
BaseDataBuffer
create
in class BaseDataBuffer
data
- the buffer to createpublic DataBuffer create(float[] data)
BaseDataBuffer
create
in class BaseDataBuffer
data
- the buffer to createpublic DataBuffer create(int[] data)
BaseDataBuffer
create
in class BaseDataBuffer
data
- the buffer to createprotected DataBuffer create(int length)
BaseDataBuffer
create
in class BaseDataBuffer
length
- a databuffer of the same type as
this with the given lengthpublic void flush()
DataBuffer
flush
in interface DataBuffer
flush
in class BaseDataBuffer
public int getElementSize()
DataBuffer
Copyright © 2015. All Rights Reserved.