|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.util.PrimitiveList
uk.ac.starlink.util.DoubleList
Extendable array of doubles.
Constructor Summary | |
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. |
Method Summary | |
void |
add(double value)
Appends a value to the end of this list. |
double |
get(int i)
Returns the element at a given position. |
void |
set(int i,
double value)
Sets the element at a given position. |
double[] |
toDoubleArray()
Returns the contents of this list as an array. |
Methods inherited from class uk.ac.starlink.util.PrimitiveList |
size, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DoubleList()
public DoubleList(int size)
size
- initial capacitypublic DoubleList(double[] array)
array
- array whose contents form initial contents of listMethod Detail |
public double get(int i)
i
- index
i
public void set(int i, double value)
i
- indexvalue
- new value for element i
public void add(double value)
value
- value to appendpublic double[] toDoubleArray()
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |