com.rti.dds.util.Sequence
< boolean >.
More...
Public Member Functions | |
BooleanSeq () | |
Constructs an empty sequence of booleans with an initial maximum of zero. | |
BooleanSeq (int initialMaximum) | |
Constructs an empty sequence of booleans with the given initial maximum. | |
BooleanSeq (boolean[] booleans) | |
Constructs a new sequence containing the given booleans. | |
boolean | addAllBoolean (boolean[] elements, int offset, int length) |
Append length elements from the given array to this sequence, starting at index offset in that array. | |
boolean | addAllBoolean (boolean[] elements) |
void | addBoolean (boolean element) |
Append the element to the end of the sequence. | |
void | addBoolean (int index, boolean element) |
Shift all elements in the sequence starting from the given index and add the element to the given index. | |
boolean | getBoolean (int index) |
Returns the boolean at the given index. | |
boolean | setBoolean (int index, boolean element) |
Set the new boolean at the given index and return the old boolean. | |
void | setBoolean (int dstIndex, boolean[] elements, int srcIndex, int length) |
Copy a portion of the given array into this sequence. | |
boolean[] | toArrayBoolean (boolean[] array) |
Return an array containing copy of the contents of this sequence. | |
int | getMaximum () |
Get the current maximum number of elements that can be stored in this sequence. | |
Object | get (int index) |
A wrapper for getBoolean(int) that returns a java.lang.Boolean. | |
Object | set (int index, Object element) |
A wrapper for setBoolean(). | |
void | add (int index, Object element) |
A wrapper for addBoolean(int, int). |
com.rti.dds.util.Sequence
< boolean >.
BooleanSeq | ( | ) |
Constructs an empty sequence of booleans with an initial maximum of zero.
BooleanSeq | ( | int | initialMaximum | ) |
Constructs an empty sequence of booleans with the given initial maximum.
BooleanSeq | ( | boolean[] | booleans | ) |
Constructs a new sequence containing the given booleans.
booleans | the initial contents of this sequence |
NullPointerException | if the input array is null |
boolean addAllBoolean | ( | boolean[] | elements, | |
int | offset, | |||
int | length | |||
) |
Append length
elements from the given array to this sequence, starting at index offset
in that array.
NullPointerException | if the given array is null. |
boolean addAllBoolean | ( | boolean[] | elements | ) |
NullPointerException | if the given array is null |
void addBoolean | ( | boolean | element | ) |
Append the element to the end of the sequence.
void addBoolean | ( | int | index, | |
boolean | element | |||
) |
Shift all elements in the sequence starting from the given index and add the element to the given index.
boolean getBoolean | ( | int | index | ) |
Returns the boolean at the given index.
IndexOutOfBoundsException | if the index is out of bounds. |
boolean setBoolean | ( | int | index, | |
boolean | element | |||
) |
Set the new boolean at the given index and return the old boolean.
IndexOutOfBoundsException | if the index is out of bounds. |
void setBoolean | ( | int | dstIndex, | |
boolean[] | elements, | |||
int | srcIndex, | |||
int | length | |||
) |
Copy a portion of the given array into this sequence.
dstIndex | the index at which to start copying into this sequence. | |
elements | an array of primitive elements. | |
srcIndex | the index at which to start copying from the given array. | |
length | the number of elements to copy. |
IndexOutOfBoundsException | if copying would cause access of data outside array bounds. |
boolean [] toArrayBoolean | ( | boolean[] | array | ) |
Return an array containing copy of the contents of this sequence.
array | The array into which this sequence should be copied. It may be null. If it is, or if array length is too small, the array will be ignored, and a new array of the necessary length will be created and copied into instead. |
int getMaximum | ( | ) |
Get the current maximum number of elements that can be stored in this sequence.
The maximum
of the sequence represents the maximum number of elements that the underlying buffer can hold. It does not represent the current number of elements.
The maximum
is a non-negative number. It is initialized when the sequence is first created.
The maximum
can be changed implicitly by adding an element to the sequence with add()
, or explicitly by calling Sequence.setMaximum.
Implements Sequence.
Object get | ( | int | index | ) | [virtual] |
A wrapper for getBoolean(int) that returns a java.lang.Boolean.
Implements AbstractPrimitiveSequence.
Object set | ( | int | index, | |
Object | element | |||
) | [virtual] |
A wrapper for setBoolean().
ClassCastException | if the element is not of type Boolean. |
Implements AbstractPrimitiveSequence.
void add | ( | int | index, | |
Object | element | |||
) | [virtual] |
A wrapper for addBoolean(int, int).
ClassCastException | if the element is not of type Boolean. |
Implements AbstractPrimitiveSequence.