public class FastFloatBuffer
extends java.lang.Object
float buffer.
This buffer implementation does not store all data
in single array, but in array of chunks.| Constructor and Description |
|---|
FastFloatBuffer()
Creates a new
float buffer. |
FastFloatBuffer(int size)
Creates a new
float buffer, with a buffer capacity of
the specified size, in bytes. |
| Modifier and Type | Method and Description |
|---|---|
FastFloatBuffer |
append(FastFloatBuffer buff)
Appends another fast buffer to this one.
|
FastFloatBuffer |
append(float element)
Appends single
float to buffer. |
FastFloatBuffer |
append(float[] array)
Appends
float array to buffer. |
FastFloatBuffer |
append(float[] array,
int off,
int len)
Appends
float array to buffer. |
float[] |
array(int index)
Returns
float inner array chunk at given index. |
void |
clear()
Resets the buffer content.
|
float |
get(int index)
Returns
float element at given index. |
int |
index()
Returns current index of inner
float array chunk. |
boolean |
isEmpty()
Tests if this buffer has no elements.
|
int |
offset()
Returns the offset of last used element in current inner array chunk.
|
int |
size()
Returns buffer size.
|
float[] |
toArray()
Creates
float array from buffered content. |
float[] |
toArray(int start,
int len)
Creates
float subarray from buffered content. |
public FastFloatBuffer()
float buffer. The buffer capacity is
initially 1024 bytes, though its size increases if necessary.public FastFloatBuffer(int size)
float buffer, with a buffer capacity of
the specified size, in bytes.size - the initial size.java.lang.IllegalArgumentException - if size is negative.public FastFloatBuffer append(float[] array, int off, int len)
float array to buffer.public FastFloatBuffer append(float[] array)
float array to buffer.public FastFloatBuffer append(float element)
float to buffer.public FastFloatBuffer append(FastFloatBuffer buff)
public int size()
public boolean isEmpty()
public int index()
float array chunk.
Represents the index of last used inner array chunk.public int offset()
public float[] array(int index)
float inner array chunk at given index.
May be used for iterating inner chunks in fast manner.public void clear()
public float[] toArray()
float array from buffered content.public float[] toArray(int start,
int len)
float subarray from buffered content.public float get(int index)
float element at given index.Copyright © 2003-2013 Jodd Team