Foo
.
More...
Public Member Functions | |
FooSeq () | |
FooSeq (int initialMaximum) | |
FooSeq (Collection elements) |
Foo
.
For users who define data types in OMG IDL, this type corresponds to the IDL express sequence
<Foo>
.
For any user-data type Foo
that an application defines for the purpose of data-distribution with RTI Connext, a FooSeq
is generated. We refer to an IDL sequence
<Foo>
asFooSeq
.
A sequence is a type-safe List that makes a distinction between its allocated size and its logical size (much like the ArrayList class). The Collection.size() method returns the logical size.
A new sequence is created for elements of a particular Class, which does not change throughout the lifetime of a sequence instance.
To add an element to a sequence, use the add()
method inherited from the standard interface java.util.List
; this will implicitly increase the sequence's size. Or, to pre-allocate space for several elements at once, use Sequence.setMaximum.
An attempt to add an element to a sequence that is not of the correct element type will result in a ClassCastException. (Note that null is considered to belong to any type.)
FooSeq | ( | ) |
Construct a new empty sequence with an initial maximum of 0.
FooSeq | ( | int | initialMaximum | ) |
Construct a new empty sequence with the given initial maximum.
FooSeq | ( | Collection | elements | ) |
Construct a new sequence containing the same elements as the given collection and having an initial maximum equal to its size.