RTI Connext Java API Version 7.1.0
|
Instantiates com.rti.dds.infrastructure.com.rti.dds.util.Sequence
< long >
More...
Public Member Functions | |
LongSeq () | |
Constructs an empty sequence of long integers with an initial maximum of zero. More... | |
LongSeq (int initialMaximum) | |
Constructs an empty sequence of long integers with the given initial maximum. More... | |
LongSeq (long[] longs) | |
Constructs a new sequence containing the given longs. More... | |
boolean | addAllLong (long[] elements, int offset, int length) |
Append length elements from the given array to this sequence, starting at index offset in that array. More... | |
boolean | addAllLong (long[] elements) |
void | addLong (long element) |
Append the element to the end of the sequence. More... | |
void | addLong (int index, long element) |
Shift all elements in the sequence starting from the given index and add the element to the given index. More... | |
long | getLong (int index) |
Returns the long at the given index. More... | |
long | setLong (int index, long element) |
Set the new long at the given index and return the old long. More... | |
void | setLong (int dstIndex, long[] elements, int srcIndex, int length) |
Copy a portion of the given array into this sequence. More... | |
long[] | toArrayLong (long[] array) |
Return an array containing copy of the contents of this sequence. More... | |
int | getMaximum () |
Get the current maximum number of elements that can be stored in this sequence. More... | |
Object | get (int index) |
A wrapper for getLong(int) that return a java.lang.Long. More... | |
Object | set (int index, Object element) |
A wrapper for setLong(). More... | |
void | add (int index, Object element) |
A wrapper for addLong(int, int). More... | |
Public Member Functions inherited from AbstractPrimitiveSequence | |
final Class | getElementType () |
abstract void | add (int index, Object element) |
Inserts the specified element at the specified position in this sequence. More... | |
void | loan (Object buffer, int new_length) |
Loan a contiguous buffer to this sequence. More... | |
void | unloan () |
Return the loaned buffer in the sequence and set the maximum to 0. More... | |
final boolean | hasOwnership () |
Return the value of the owned flag. More... | |
final void | clear () |
final void | setSize (int newSize) |
final int | size () |
final Object | copy_from (Object src) |
Public Member Functions inherited from AbstractSequence | |
void | setMaximum (int new_max) |
Resize this sequence to a new desired maximum. More... | |
Class | getElementType () |
void | add (int index, Object element) |
Inserts the specified element at the specified position in this sequence. More... | |
boolean | add (Object element) |
Appends the specified element to the end of this sequence. More... | |
final Object | remove (int index) |
Remove the element at the given index by shifting all subsequent elements "left" by one. More... | |
int | getMaximum () |
Get the current maximum number of elements that can be stored in this sequence. More... | |
void | setMaximum (int new_max) |
Resize this sequence to a new desired maximum. More... | |
Class | getElementType () |
Object | copy_from (Object src) |
Copy value of a data type from source. More... | |
Instantiates com.rti.dds.infrastructure.com.rti.dds.util.Sequence
< long >
LongSeq | ( | ) |
Constructs an empty sequence of long integers with an initial maximum of zero.
LongSeq | ( | int | initialMaximum | ) |
Constructs an empty sequence of long integers with the given initial maximum.
LongSeq | ( | long[] | longs | ) |
Constructs a new sequence containing the given longs.
longs | the initial contents of this sequence |
NullPointerException | if the input array is null |
References LongSeq.addAllLong().
boolean addAllLong | ( | long[] | 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. |
Referenced by LongSeq.addAllLong(), and LongSeq.LongSeq().
boolean addAllLong | ( | long[] | elements | ) |
NullPointerException | if the given array is null |
References LongSeq.addAllLong().
void addLong | ( | long | element | ) |
Append the element to the end of the sequence.
Referenced by LongSeq.add().
void addLong | ( | int | index, |
long | element | ||
) |
Shift all elements in the sequence starting from the given index and add the element to the given index.
long getLong | ( | int | index | ) |
Returns the long at the given index.
IndexOutOfBoundsException | if the index is out of bounds. |
Referenced by LongSeq.get().
long setLong | ( | int | index, |
long | element | ||
) |
Set the new long at the given index and return the old long.
IndexOutOfBoundsException | if the index is out of bounds. |
Referenced by LongSeq.set().
void setLong | ( | int | dstIndex, |
long[] | 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. |
long[] toArrayLong | ( | long[] | 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 com.rti.dds.infrastructure.com.rti.dds.util.Sequence.Sequence.setMaximum.
Implements Sequence.
Referenced by DynamicData.get_long_seq(), and DynamicData.set_long_seq().
Object get | ( | int | index | ) |
A wrapper for getLong(int) that return a java.lang.Long.
Reimplemented from AbstractPrimitiveSequence.
References LongSeq.getLong().
Object set | ( | int | index, |
Object | element | ||
) |
A wrapper for setLong().
ClassCastException | if the element is not of type Long. |
Reimplemented from AbstractPrimitiveSequence.
References LongSeq.setLong().
void add | ( | int | index, |
Object | element | ||
) |
A wrapper for addLong(int, int).
ClassCastException | if the element is not of type Long. |
Reimplemented from AbstractPrimitiveSequence.
References LongSeq.addLong().