Package org.yamcs.utils
Class FloatArray
java.lang.Object
org.yamcs.utils.FloatArray
float array
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a sorted int array with a default initial capacityFloatArray
(int capacity) Creates an IntArray with a given initial capacity -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(float x) add value to the arrayvoid
add
(int pos, float x) float[]
array()
boolean
float
get
(int pos) get element at positionint
hashCode()
boolean
isEmpty()
void
set
(int pos, float x) int
size()
float[]
toArray()
toString()
static FloatArray
wrap
(float[] floats)
-
Field Details
-
DEFAULT_CAPACITY
public static final int DEFAULT_CAPACITY- See Also:
-
-
Constructor Details
-
FloatArray
public FloatArray()Creates a sorted int array with a default initial capacity -
FloatArray
public FloatArray(int capacity) Creates an IntArray with a given initial capacity- Parameters:
capacity
-
-
-
Method Details
-
add
public void add(float x) add value to the array- Parameters:
x
- - value to be added
-
add
public void add(int pos, float x) -
get
public float get(int pos) get element at position- Parameters:
pos
-- Returns:
-
isEmpty
public boolean isEmpty() -
toArray
public float[] toArray() -
size
public int size() -
set
public void set(int pos, float x) -
toString
-
hashCode
public int hashCode() -
equals
-
wrap
-
array
public float[] array()
-