Package org.yamcs.utils
Class DoubleArray
- java.lang.Object
-
- org.yamcs.utils.DoubleArray
-
public class DoubleArray extends Object
expandable double array
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CAPACITY
-
Constructor Summary
Constructors Constructor Description DoubleArray()
Creates a sorted int array with a default initial capacityDoubleArray(int capacity)
Creates an IntArray with a given initial capacity
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(double x)
add value to the arrayvoid
add(int pos, double x)
double[]
array()
boolean
equals(Object obj)
double
get(int pos)
get element at positionint
hashCode()
boolean
isEmpty()
void
set(int pos, double x)
int
size()
double[]
toArray()
String
toString()
static DoubleArray
wrap(double[] doubles)
-
-
-
Method Detail
-
add
public void add(double x)
add value to the array- Parameters:
x
-
-
add
public void add(int pos, double x)
-
get
public double get(int pos)
get element at position- Parameters:
pos
-- Returns:
-
isEmpty
public boolean isEmpty()
-
toArray
public double[] toArray()
-
size
public int size()
-
set
public void set(int pos, double x)
-
wrap
public static DoubleArray wrap(double[] doubles)
-
array
public double[] array()
-
-