| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.util.ResizableDoubleList
public class ResizableDoubleList
This is a gadget for storing values of prmitive double type
 with java.lang.ArrayList-like functionality and
 considerably better performance.
 
 Woohoo!
| Constructor Summary | |
|---|---|
| ResizableDoubleList()Constructor for ResizableDoubleList. | |
| ResizableDoubleList(int initialBufferSize)Constructor for ResizableDoubleList. | |
| Method Summary | |
|---|---|
|  void | add(double d)Adds a single value to the end of the array. | 
|  void | add(double[] da)Adds array of doubles to the end of the array. | 
|  void | add(double[] da,
    int index)Adds an array of doubles at specified index. | 
|  void | add(double d,
    int index)Adds a single value at specified index. | 
|  void | displayIndexes()This is merely a debug method. | 
|  void | displayRelevant()This is merely a debug method. | 
|  double | get(int index)Gets the value at specified index. | 
|  double[] | getArray()Gets the whole array | 
|  double[] | getArray(int index)Gets sub-array from specified index onwards. | 
|  double[] | getArray(int index,
         int lenght)Gets the sub-array of specified lenght from the specified index | 
|  double[] | getBufferArray()This method is for testing and debuging purposes only. | 
| static void | main(java.lang.String[] args)Run test applet. | 
|  void | remove(int index,
       int lenght)Removes the specified number of values from (including) specified index onwards. | 
|  void | set(int index,
    double value)Sets the value at specified index. | 
|  int | size()Gets the size of the array. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ResizableDoubleList()
this(10) constructor.
public ResizableDoubleList(int initialBufferSize)
initialBufferSize - the initial size of buffer array into which the values are stored.| Method Detail | 
|---|
public void add(double d)
d - value to addpublic void add(double[] da)
da - array to add
public void add(double d,
                int index)
d - value to addindex - the index at which the value will be inserted
public void add(double[] da,
                int index)
da - array to addindex - the index at which the array will be inserted
public void remove(int index,
                   int lenght)
index - the index of first value to removelenght - the number of values to removepublic int size()
public double[] getArray()
public double[] getArray(int index,
                         int lenght)
index - the indexlenght - the lenght
public double[] getArray(int index)
index - the index
public double get(int index)
index - the index
public void set(int index,
                double value)
index - the indexvalue - the new valuepublic double[] getBufferArray()
public static void main(java.lang.String[] args)
args - command line parameterspublic void displayRelevant()
public void displayIndexes()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||