Package org.yamcs.utils
Class BooleanArray
- java.lang.Object
-
- org.yamcs.utils.BooleanArray
-
public class BooleanArray extends Object
an array that stores the bits in a long[] - each long stores 64 values
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_CAPACITY
-
Constructor Summary
Constructors Constructor Description BooleanArray()
BooleanArray(int length)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(boolean b)
Add value at the end of the arrayvoid
add(int pos, boolean b)
Inserts the given value in the specified position in the array.boolean
get(int pos)
Get value on position posint
size()
long[]
toLongArray()
static BooleanArray
valueOf(long[] a, int length)
Create a BooleanArray from the given
-
-
-
Method Detail
-
add
public void add(int pos, boolean b)
Inserts the given value in the specified position in the array. Shift all the existing elements at position and the subsequent ones to the right- Parameters:
pos
-b
-
-
toLongArray
public long[] toLongArray()
-
get
public boolean get(int pos)
Get value on position pos- Parameters:
pos
-- Returns:
-
size
public int size()
-
add
public void add(boolean b)
Add value at the end of the array- Parameters:
b
-
-
valueOf
public static BooleanArray valueOf(long[] a, int length)
Create a BooleanArray from the given
-
-