public class FastDoubleBuffer
extends java.lang.Object
double
buffer.Constructor and Description |
---|
FastDoubleBuffer()
Creates a new
double buffer. |
FastDoubleBuffer(int size)
Creates a new
double buffer, with a buffer capacity of
the specified size. |
Modifier and Type | Method and Description |
---|---|
void |
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.
|
void |
clear()
Resets the buffer content.
|
double |
get(int index)
Returns
double element at given index. |
boolean |
isEmpty()
Tests if this buffer has no elements.
|
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. |
public FastDoubleBuffer()
double
buffer. The buffer capacity is
initially 64 doubles, though its size increases if necessary.public FastDoubleBuffer(int size)
double
buffer, with a buffer capacity of
the specified size.size
- the initial size.java.lang.IllegalArgumentException
- if size is negative.public void append(double element)
double
to buffer.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(FastDoubleBuffer buff)
public int size()
public boolean isEmpty()
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.Copyright © 2003-present Jodd Team