Package org.yamcs.utils
Class LongArray
- java.lang.Object
-
- org.yamcs.utils.LongArray
-
public class LongArray extends Object
long array
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_CAPACITY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int pos, long x)voidadd(long x)add value to the arraylong[]array()get the backing array.booleanequals(Object obj)longget(int pos)get element at positioninthashCode()booleanisEmpty()voidset(int pos, long x)intsize()long[]toArray()StringtoString()static LongArraywrap(long... array)Creates the IntArray with the backing array
-
-
-
Method Detail
-
wrap
public static LongArray wrap(long... array)
Creates the IntArray with the backing array- Parameters:
array-
-
add
public void add(long x)
add value to the array- Parameters:
x- - value to be added
-
add
public void add(int pos, long x)
-
get
public long get(int pos)
get element at position- Parameters:
pos-- Returns:
-
isEmpty
public boolean isEmpty()
-
toArray
public long[] toArray()
-
size
public int size()
-
set
public void set(int pos, long x)
-
array
public long[] array()
get the backing array. It's length will be ≥ than the size of the array.- Returns:
-
-