com.rti.dds.util.Sequence
< double >.
More...
Public Member Functions | |
DoubleSeq () | |
Constructs an empty sequence of doubles with an initial maximum of zero. | |
DoubleSeq (int initialMaximum) | |
Constructs an empty sequence of doubles with the given initial maximum. | |
DoubleSeq (double[] doubles) | |
Constructs a new sequence containing the given doubles. | |
final boolean | addAllDouble (double[] elements, int offset, int length) |
Append length elements from the given array to this sequence, starting at index offset in that array. | |
final boolean | addAllDouble (double[] elements) |
final void | addDouble (double element) |
Append the element to the end of the sequence. | |
final void | addDouble (int index, double element) |
Shift all elements in the sequence starting from the given index and add the element to the given index. | |
final double | getDouble (int index) |
Returns the double at the given index. | |
final double | setDouble (int index, double element) |
Set the new double at the given index and return the old double. | |
final void | setDouble (int dstIndex, double[] elements, int srcIndex, int length) |
Copy a portion of the given array into this sequence. | |
final double[] | toArrayDouble (double[] array) |
Return an array containing copy of the contents of this sequence. | |
final int | getMaximum () |
Get the current maximum number of elements that can be stored in this sequence. | |
final Object | get (int index) |
A wrapper for getDouble(int) that returns a java.lang.Double. | |
final Object | set (int index, Object element) |
A wrapper for setDouble(). | |
final void | add (int index, Object element) |
A wrapper for addDouble(int, int). |
com.rti.dds.util.Sequence
< double >.
DoubleSeq | ( | ) |
Constructs an empty sequence of doubles with an initial maximum of zero.
DoubleSeq | ( | int | initialMaximum | ) |
Constructs an empty sequence of doubles with the given initial maximum.
DoubleSeq | ( | double[] | doubles | ) |
Constructs a new sequence containing the given doubles.
doubles | the initial contents of this sequence |
NullPointerException | if the input array is null |
final boolean addAllDouble | ( | double[] | 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. |
final boolean addAllDouble | ( | double[] | elements | ) |
NullPointerException | if the given array is null |
final void addDouble | ( | double | element | ) |
Append the element to the end of the sequence.
final void addDouble | ( | int | index, | |
double | element | |||
) |
Shift all elements in the sequence starting from the given index and add the element to the given index.
final double getDouble | ( | int | index | ) |
Returns the double at the given index.
IndexOutOfBoundsException | if the index is out of bounds. |
final double setDouble | ( | int | index, | |
double | element | |||
) |
Set the new double at the given index and return the old double.
IndexOutOfBoundsException | if the index is out of bounds. |
final void setDouble | ( | int | dstIndex, | |
double[] | 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. |
final double [] toArrayDouble | ( | double[] | 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. |
final 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.
final Object get | ( | int | index | ) | [virtual] |
A wrapper for getDouble(int) that returns a java.lang.Double.
Implements AbstractPrimitiveSequence.
final Object set | ( | int | index, | |
Object | element | |||
) | [virtual] |
A wrapper for setDouble().
ClassCastException | if the element is not of type Double. |
Implements AbstractPrimitiveSequence.
final void add | ( | int | index, | |
Object | element | |||
) | [virtual] |
A wrapper for addDouble(int, int).
ClassCastException | if the element is not of type Double. |
Implements AbstractPrimitiveSequence.