public class DoubleArray
extends java.lang.Object
| Constructor and Description |
|---|
DoubleArray(int initialLength,
double initialValue)
Constructs a DoubleArray object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fill(double value)
Fills elements of the the array with the specified value.
|
double |
get(int n)
Gets the specified array element.
|
void |
set(int n,
double value)
Sets the specified array element.
|
void |
setLength(int newLength)
Sets the length of the array.
|
public DoubleArray(int initialLength,
double initialValue)
initialLength - the initial length of the arrayinitialValue - the initial value of all array elementspublic double get(int n)
n - the array indexpublic void set(int n,
double value)
n - the array indexvalue - the new value of the elementpublic void setLength(int newLength)
newLength - the new length of the arraypublic void fill(double value)
value - the value