RTI Connext Java API  Version 6.1.1
AbstractSequence Class Referenceabstract

Abstract sequence. More...

Inheritance diagram for AbstractSequence:
Sequence AbstractPrimitiveSequence LoanableSequence BooleanSeq ByteSeq CharSeq DoubleSeq FloatSeq IntSeq LongSeq ShortSeq SampleInfoSeq BytesSeq KeyedBytesSeq KeyedStringSeq FooSeq

Public Member Functions

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...
 
- Public Member Functions inherited from Sequence
int getMaximum ()
 Get the current maximum number of elements that can be stored in this sequence. More...
 

Detailed Description

Abstract sequence.

Member Function Documentation

◆ setMaximum()

void setMaximum ( int  new_max)

Resize this sequence to a new desired maximum.

This operation does nothing if the new desired maximum matches the current maximum.

Note: If you add an element with add(), the sequence's size is increased implicitly.

Postcondition
length == MINIMUM(original length, new_max)
Parameters
new_maxMust be >= 0.
Returns
com.rti.dds.infrastructure.true on success, com.rti.dds.infrastructure.false if the preconditions are not met. In that case the sequence is not modified.

Implements Sequence.

References Sequence.getMaximum().

Referenced by AbstractPrimitiveSequence.copy_from(), and DynamicData.to_cdr_buffer().

◆ getElementType()

Class getElementType ( )
Returns
a common supertype for all elements in this sequence.

Implements Sequence.

◆ add() [1/2]

void add ( int  index,
Object  element 
)

Inserts the specified element at the specified position in this sequence.

See also
java.util.List::add(int, java.lang.Object)

Referenced by FooSeq.copy_from(), BytesSeq.copy_from(), KeyedBytesSeq.copy_from(), and KeyedStringSeq.copy_from().

◆ add() [2/2]

boolean add ( Object  element)

Appends the specified element to the end of this sequence.

See also
java.util.List::add(java.lang.Object)

◆ remove()

final Object remove ( int  index)

Remove the element at the given index by shifting all subsequent elements "left" by one.

See also
java.util.List::remove(int)

References Sequence.getMaximum().

Referenced by Locator_t.Locator_t().