| Modifier and Type | Method and Description |
|---|---|
| public void | addElement(double
to be added to end of array value)Adds an element to the end of this expandable array |
| public double | Returns: the value which has been discarded or "pushed" out of the array by this rolling insertthe value to be added to the array value)Adds an element to the end of the array and removes the first element in the array. |
| public void | addElements(double[]
to be added to end of array values)Adds elements to the end of this expandable array |
| public void | |
| public double | Returns: value stored at the specified indexindex to fetch a value from index)Returns the element at the specified index. |
| public double[] | Returns: all elements added to the arrayReturns a double[] array containing the elements of this
|
| public int | |
| public void | setElement(int
index to store a value in index, double value to store at the specified index value)Sets the element at the specified index. |
| addElement | back to summary |
|---|---|
| public void addElement(double value) Adds an element to the end of this expandable array
| |
| addElementRolling | back to summary |
|---|---|
| public double addElementRolling(double value) Adds an element to the end of the array and removes the first element in the array. Returns the discarded first element. The effect is similar to a push operation in a FIFO queue. Example: If the array contains the elements 1, 2, 3, 4 (in that order) and addElementRolling(5) is invoked, the result is an array containing the entries 2, 3, 4, 5 and the value returned is 1.
| |
| addElements | back to summary |
|---|---|
| public void addElements(double[] values) Adds elements to the end of this expandable array
| |
| clear | back to summary |
|---|---|
| public void clear() Clear the double array | |
| getElement | back to summary |
|---|---|
| public double getElement(int index) Returns the element at the specified index. Note that if an out of bounds index is supplied a ArrayIndexOutOfBoundsException will be thrown.
| |
| getElements | back to summary |
|---|---|
| public double[] getElements() Returns a double[] array containing the elements of this
| |
| getNumElements | back to summary |
|---|---|
| public int getNumElements() Returns the number of elements currently in the array. Please note that this may be different from the length of the internal storage array.
| |
| setElement | back to summary |
|---|---|
| public void setElement(int index, double value) Sets the element at the specified index. If the specified index is greater than
| |