public class CircularBufferDouble extends ListDouble
Constructor and Description |
---|
CircularBufferDouble(int maxCapacity)
Creates a new circular buffer with the given maximum capacity.
|
CircularBufferDouble(int initialCapacity,
int maxCapacity)
Creates a new circular buffer with the given initial and maximum
capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
addDouble(double value)
Adds a new value.
|
void |
clear()
Removes all values from the buffer.
|
int |
getCurrentCapacity()
The maximum capacity for this circular buffer.
|
double |
getDouble(int index)
Returns the element at the specified position in this list casted to a double.
|
int |
size()
Returns the number of elements in the collection.
|
public CircularBufferDouble(int maxCapacity)
maxCapacity
- maximum capacitypublic CircularBufferDouble(int initialCapacity, int maxCapacity)
initialCapacity
- initial capacitymaxCapacity
- maximum capacitypublic double getDouble(int index)
index
- position of the element to returnpublic int size()
public void addDouble(double value)
value
- new valuepublic void clear()
public int getCurrentCapacity()
Copyright © 2015. All rights reserved.