Package org.yamcs.utils
Class BooleanArray
java.lang.Object
org.yamcs.utils.BooleanArray
an array that stores the bits in a long[] - each long stores 64 values
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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[]
static BooleanArray
valueOf
(long[] a, int length) Create a BooleanArray from the given
-
Field Details
-
DEFAULT_CAPACITY
public static int DEFAULT_CAPACITY
-
-
Constructor Details
-
BooleanArray
public BooleanArray() -
BooleanArray
public BooleanArray(int length)
-
-
Method Details
-
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
Create a BooleanArray from the given
-