public class FloatBuffer extends BaseDataBuffer
length, MAPPING_SIZE, mappings, memoryMappedBuffer, path
DOUBLE, FLOAT
Constructor and Description |
---|
FloatBuffer(float[] buffer) |
FloatBuffer(float[] buffer,
boolean copy) |
FloatBuffer(int length) |
Modifier and Type | Method and Description |
---|---|
byte[] |
asBytes()
Raw byte array storage
|
double[] |
asDouble()
Return the buffer as a double array
Relative to the datatype, this will either be a copy
or a reference.
|
float[] |
asFloat()
Return the buffer as a float array
Relative to the datatype, this will either be a copy
or a reference.
|
int[] |
asInt()
Return the buffer as an int array
Relative to the datatype, this will either be a copy
or a reference.
|
java.lang.String |
dataType()
The data type of the buffer
|
void |
destroy()
Clears this buffer
|
DataBuffer |
dup()
Return a copy of this buffer
|
boolean |
equals(java.lang.Object o) |
void |
flush()
Flush the data buffer
|
double |
getDouble(int i)
Get element i in the buffer as a double
|
float |
getFloat(int i)
Get element i in the buffer as a double
|
int |
getInt(int ix)
Get the int at the specified index
|
java.lang.Number |
getNumber(int i)
Get element i in the buffer as a double
|
int |
hashCode() |
void |
put(int i,
double element)
Assign an element in the buffer to the specified index
|
void |
put(int i,
float element)
Assign an element in the buffer to the specified index
|
void |
put(int i,
int element)
Assign an element in the buffer to the specified index
|
asType, getElement, length, put, toByteArray, toByteArray, toByteArray, toDouble, toFloat, toInt
public FloatBuffer(int length)
public FloatBuffer(float[] buffer)
public FloatBuffer(float[] buffer, boolean copy)
public byte[] asBytes()
DataBuffer
public java.lang.String dataType()
DataBuffer
public float[] asFloat()
DataBuffer
public double[] asDouble()
DataBuffer
public int[] asInt()
DataBuffer
public double getDouble(int i)
DataBuffer
i
- the element to getFloatpublic float getFloat(int i)
DataBuffer
i
- the element to getFloatpublic java.lang.Number getNumber(int i)
DataBuffer
i
- the element to getFloatpublic void put(int i, float element)
DataBuffer
i
- the indexelement
- the element to assignpublic void put(int i, double element)
DataBuffer
i
- the indexelement
- the element to assignpublic void put(int i, int element)
DataBuffer
i
- the indexelement
- the element to assignpublic int getInt(int ix)
DataBuffer
ix
- the int at the specified indexpublic DataBuffer dup()
DataBuffer
public void flush()
DataBuffer
public void destroy()
DataBuffer
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2014. All Rights Reserved.