|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.buffer.FastDoubleBuffer
public class FastDoubleBuffer
Fast, fast double buffer.
| Constructor Summary | |
|---|---|
FastDoubleBuffer()
Creates a new double buffer. |
|
FastDoubleBuffer(int size)
Creates a new double buffer, with a buffer capacity of
the specified size, in bytes. |
|
| Method Summary | |
|---|---|
FastDoubleBuffer |
append(double element)
Appends single double to buffer. |
FastDoubleBuffer |
append(double[] array)
Appends double array to buffer. |
FastDoubleBuffer |
append(double[] array,
int off,
int len)
Appends double array to buffer. |
FastDoubleBuffer |
append(FastDoubleBuffer buff)
Appends another fast buffer to this one. |
double[] |
array(int index)
Returns double inner array chunk at given index. |
void |
clear()
Resets the buffer content. |
double |
get(int index)
Returns double element at given index. |
int |
index()
Returns current index of inner double 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. |
double[] |
toArray()
Creates double array from buffered content. |
double[] |
toArray(int start,
int len)
Creates double subarray from buffered content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FastDoubleBuffer()
double buffer. The buffer capacity is
initially 1024 bytes, though its size increases if necessary.
public FastDoubleBuffer(int size)
double buffer, with a buffer capacity of
the specified size, in bytes.
size - the initial size.
java.lang.IllegalArgumentException - if size is negative.| Method Detail |
|---|
public FastDoubleBuffer append(double[] array,
int off,
int len)
double array to buffer.
public FastDoubleBuffer append(double[] array)
double array to buffer.
public FastDoubleBuffer append(double element)
double to buffer.
public FastDoubleBuffer append(FastDoubleBuffer buff)
public int size()
public boolean isEmpty()
public int index()
double array chunk.
Represents the index of last used inner array chunk.
public int offset()
public double[] array(int index)
double inner array chunk at given index.
May be used for iterating inner chunks in fast manner.
public void clear()
public double[] toArray()
double array from buffered content.
public double[] toArray(int start,
int len)
double subarray from buffered content.
public double get(int index)
double element at given index.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||