public class SortedDoubleVector extends Object
Constructor and Description |
---|
SortedDoubleVector()
Constructor.
|
SortedDoubleVector(ArrayList<Double> values) |
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Add a value to the collection.
|
void |
clear()
Clear out the collection.
|
protected int |
findInsertIndex(double value)
Returns the index into which to insert to.
|
double |
getValue(int index)
Returns the value at a given index.
|
ArrayList<Double> |
getValues()
Returns underlying ArrayList, for testing purposes only.
|
void |
remove(double value)
Remove a value from the collection.
|
int |
size()
Returns the number of items in the collection.
|
public void clear()
public int size()
public double getValue(int index)
index
- for which to return value forpublic void add(double value)
value
- is the double-type value to addpublic void remove(double value)
value
- to removeIllegalStateException
- if the value has not been addedpublic ArrayList<Double> getValues()
protected int findInsertIndex(double value)
value
- to find insert index