Package org.yamcs.utils
Class DoubleArray
java.lang.Object
org.yamcs.utils.DoubleArray
expandable double array
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a sorted int array with a default initial capacityDoubleArray
(int capacity) Creates an IntArray with a given initial capacity -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(double x) add value to the arrayvoid
add
(int pos, double x) double[]
array()
boolean
double
get
(int pos) get element at positionint
hashCode()
boolean
isEmpty()
void
set
(int pos, double x) int
size()
double[]
toArray()
toString()
static DoubleArray
wrap
(double[] doubles)
-
Field Details
-
DEFAULT_CAPACITY
public static int DEFAULT_CAPACITY
-
-
Constructor Details
-
DoubleArray
public DoubleArray()Creates a sorted int array with a default initial capacity -
DoubleArray
public DoubleArray(int capacity) Creates an IntArray with a given initial capacity- Parameters:
capacity
-
-
-
Method Details
-
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) -
toString
-
hashCode
public int hashCode() -
equals
-
wrap
-
array
public double[] array()
-