RTI Connext Java API  Version 5.3.1
 All Classes Namespaces Functions Variables Groups Pages
ShortSeq Class Reference

Instantiates com.rti.dds.infrastructure.com.rti.dds.util.Sequence < short > More...

Inheritance diagram for ShortSeq:
AbstractPrimitiveSequence AbstractSequence Sequence Copyable Sequence

Public Member Functions

 ShortSeq ()
 Constructs an empty sequence of short integers with an initial maximum of zero.
 
 ShortSeq (int initialMaximum)
 Constructs an empty sequence of short integers with the given initial maximum.
 
 ShortSeq (short[] shorts)
 Constructs a new sequence containing the given shorts.
 
boolean addAllShort (short[] elements, int offset, int length)
 Append length elements from the given array to this sequence, starting at index offset in that array.
 
boolean addAllShort (short[] elements)
 
void addShort (short element)
 Append the element to the end of the sequence.
 
void addShort (int index, short element)
 Shift all elements in the sequence starting from the given index and add the element to the given index.
 
short getShort (int index)
 Returns the short at the given index.
 
short setShort (int index, short element)
 Set the new short at the given index and return the old short.
 
void setShort (int dstIndex, short[] elements, int srcIndex, int length)
 Copy a portion of the given array into this sequence.
 
short[] toArrayShort (short[] array)
 Return an array containing copy of the contents of this sequence.
 
Object get (int index)
 A wrapper for getShort(int) that returns a java.lang.Short.
 
Object set (int index, Object element)
 A wrapper for setShort().
 
void add (int index, Object element)
 A wrapper for addShort(int, int).
 
- Public Member Functions inherited from AbstractPrimitiveSequence
final Class getElementType ()
 
void loan (Object buffer, int new_length)
 Loan a contiguous buffer to this sequence.
 
void unloan ()
 Return the loaned buffer in the sequence and set the maximum to 0.
 
final boolean hasOwnership ()
 Return the value of the owned flag.
 
final void clear ()
 
final void setSize (int newSize)
 
final int size ()
 
final Object copy_from (Object src)
 
- Public Member Functions inherited from AbstractSequence
void add (int index, Object element)
 Inserts the specified element at the specified position in this sequence.
 
boolean add (Object element)
 Appends the specified element to the end of this sequence.
 
final Object remove (int index)
 Remove the element at the given index by shifting all subsequent elements "left" by one.
 
- Public Member Functions inherited from Sequence
int getMaximum ()
 Get the current maximum number of elements that can be stored in this sequence.
 
void setMaximum (int new_max)
 Resize this sequence to a new desired maximum.
 
Class getElementType ()
 

Detailed Description

Instantiates com.rti.dds.infrastructure.com.rti.dds.util.Sequence < short >

Instantiates:
<<generic>> com.rti.dds.infrastructure.com.rti.dds.util.Sequence
See Also
short
com.rti.dds.infrastructure.com.rti.dds.util.Sequence

Constructor & Destructor Documentation

ShortSeq ( )

Constructs an empty sequence of short integers with an initial maximum of zero.

ShortSeq ( int  initialMaximum)

Constructs an empty sequence of short integers with the given initial maximum.

ShortSeq ( short[]  shorts)

Constructs a new sequence containing the given shorts.

Parameters
shortsthe initial contents of this sequence
Exceptions
NullPointerExceptionif the input array is null

Member Function Documentation

boolean addAllShort ( short[]  elements,
int  offset,
int  length 
)

Append length elements from the given array to this sequence, starting at index offset in that array.

Exceptions
NullPointerExceptionif the given array is null.
boolean addAllShort ( short[]  elements)
Exceptions
NullPointerExceptionif the given array is null
void addShort ( short  element)

Append the element to the end of the sequence.

void addShort ( int  index,
short  element 
)

Shift all elements in the sequence starting from the given index and add the element to the given index.

short getShort ( int  index)

Returns the short at the given index.

Exceptions
IndexOutOfBoundsExceptionif the index is out of bounds.
short setShort ( int  index,
short  element 
)

Set the new short at the given index and return the old short.

Exceptions
IndexOutOfBoundsExceptionif the index is out of bounds.
void setShort ( int  dstIndex,
short[]  elements,
int  srcIndex,
int  length 
)

Copy a portion of the given array into this sequence.

Parameters
dstIndexthe index at which to start copying into this sequence.
elementsan array of primitive elements.
srcIndexthe index at which to start copying from the given array.
lengththe number of elements to copy.
Exceptions
IndexOutOfBoundsExceptionif copying would cause access of data outside array bounds.
short [] toArrayShort ( short[]  array)

Return an array containing copy of the contents of this sequence.

Parameters
arrayThe 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.
Returns
A non-null array containing a copy of the contents of this sequence.
Object get ( int  index)
virtual

A wrapper for getShort(int) that returns a java.lang.Short.

See Also
java.util.List::get(int)

Implements AbstractPrimitiveSequence.

Object set ( int  index,
Object  element 
)
virtual

A wrapper for setShort().

Exceptions
ClassCastExceptionif the element is not of type Short.
See Also
java.util.List::set(int, java.lang.Object)

Implements AbstractPrimitiveSequence.

void add ( int  index,
Object  element 
)
virtual

A wrapper for addShort(int, int).

Exceptions
ClassCastExceptionif the element is not of type Short.
See Also
java.util.List::add(int, java.lang.Object)

Implements AbstractPrimitiveSequence.


RTI Connext Java API Version 5.3.1 Copyright © Mon Feb 19 2018 Real-Time Innovations, Inc