|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.web3d.util.DoubleArray
Simple dynamic array structure that holds double primitives.
| Constructor Summary | |
DoubleArray()
Create a new default array with size 512 items |
|
DoubleArray(int initialSize)
Create an array with the given initial size |
|
| Method Summary | |
void |
add(double newDouble)
Add a new value to the array. |
void |
add(double[] values)
Add an array of values in bulk to the array. |
void |
clear()
Clear the array so that it contains no values |
double |
get(int index)
Get the value at the given index. |
double |
remove(int index)
Remove the value at the given index. |
void |
set(int index,
double value)
Set the value at the given index. |
int |
size()
Get the count of the number of items in the array. |
double[] |
toArray()
Turn the values of this array into a real array. |
double[] |
toArray(double[] values)
Turn the values of this array into a real array by copying them into the given array if possible. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DoubleArray()
public DoubleArray(int initialSize)
initialSize - The size to start with| Method Detail |
public int size()
public void clear()
public void add(double newDouble)
newDouble - the value to be addedpublic void add(double[] values)
values - The values to be addedpublic double get(int index)
index - The position to get values from
java.lang.IndexOutOfBoundsException - The index was not legal
public void set(int index,
double value)
index - The position to get values fromvalue - The new value to set
java.lang.IndexOutOfBoundsException - The index was not legalpublic double remove(int index)
index - The position to remove the value from
java.lang.IndexOutOfBoundsException - The index was not legalpublic double[] toArray()
public double[] toArray(double[] values)
values - The array to copy values to
|
Xj3D VRML/X3D Code API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||