public class DoubleList extends PrimitiveList
| Constructor and Description |
|---|
DoubleList()
Constructs a new list.
|
DoubleList(double[] array)
Constructs a new list initialised to the contents of a given array.
|
DoubleList(int size)
Constructs a new list with a given initial capacity.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(double value)
Appends a value to the end of this list.
|
boolean |
addAll(double[] array)
Appends all the elements of a primitive array to this list.
|
boolean |
addAll(DoubleList other)
Appends all the elements of a second list to this list.
|
double |
get(int i)
Returns the element at a given position.
|
double[] |
getDoubleBuffer()
Returns the array currently used to store the contents of this list.
|
void |
set(int i,
double value)
Sets the element at a given position.
|
double[] |
toDoubleArray()
Returns the contents of this list as an array.
|
clear, nextCapacity, size, toArraypublic DoubleList()
public DoubleList(int size)
size - initial capacitypublic DoubleList(double[] array)
array - array whose contents form initial contents of listpublic double get(int i)
i - indexipublic void set(int i,
double value)
i - indexvalue - new value for element ipublic void add(double value)
value - value to appendpublic boolean addAll(DoubleList other)
other - other listpublic boolean addAll(double[] array)
array - array to appendpublic double[] toDoubleArray()
public double[] getDoubleBuffer()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.