|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opensourcephysics.media.core.DoubleArray
public class DoubleArray
This manages an array of doubles.
Constructor Summary | |
---|---|
DoubleArray(int initialLength,
double initialValue)
Constructs a DoubleArray object. |
Method Summary | |
---|---|
boolean |
fill(double value)
Fills elements of the the array with the specified value. |
double |
get(int n)
Gets the specified array element. |
boolean |
set(int n,
double value)
Sets the specified array element. |
void |
setLength(int newLength)
Sets the length of the array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DoubleArray(int initialLength, double initialValue)
initialLength
- the initial length of the arrayinitialValue
- the initial value of all array elementsMethod Detail |
---|
public double get(int n)
n
- the array index
public boolean set(int n, double value)
n
- the array indexvalue
- the new value of the element
public void setLength(int newLength)
newLength
- the new length of the arraypublic boolean fill(double value)
value
- the value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |