Package org.yamcs.studio.data.vtype
Class ArrayBoolean
java.lang.Object
org.yamcs.studio.data.vtype.ListBoolean
org.yamcs.studio.data.vtype.ArrayBoolean
- All Implemented Interfaces:
Serializable
Wraps a
boolean[]
into a ListBoolean
.- See Also:
-
Constructor Summary
ConstructorDescriptionArrayBoolean
(boolean... array) A new read-onlyArrayBoolean
that wraps around the given array.ArrayBoolean
(boolean[] array, boolean readOnly) A newArrayBoolean
that wraps around the given array. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
getBoolean
(int index) Returns the element at the specified position in this list.void
setBoolean
(int index, boolean value) Changes the element at the specified position.int
size()
Returns the number of elements in the collection.Methods inherited from class org.yamcs.studio.data.vtype.ListBoolean
hashCode
-
Constructor Details
-
ArrayBoolean
public ArrayBoolean(boolean... array) A new read-onlyArrayBoolean
that wraps around the given array.- Parameters:
array
- an array
-
ArrayBoolean
public ArrayBoolean(boolean[] array, boolean readOnly) A newArrayBoolean
that wraps around the given array.- Parameters:
array
- an arrayreadOnly
- if false the wrapper allows writes to the array
-
-
Method Details
-
size
public int size()Description copied from class:ListBoolean
Returns the number of elements in the collection.- Specified by:
size
in classListBoolean
-
getBoolean
public boolean getBoolean(int index) Description copied from class:ListBoolean
Returns the element at the specified position in this list.- Specified by:
getBoolean
in classListBoolean
- Parameters:
index
- position of the element to return- Returns:
- the element at the specified position in this list
-
setBoolean
public void setBoolean(int index, boolean value) Description copied from class:ListBoolean
Changes the element at the specified position.- Specified by:
setBoolean
in classListBoolean
- Parameters:
index
- position of the element to changevalue
- the new value
-
equals
- Overrides:
equals
in classListBoolean
-