- All Superinterfaces:
DataElement,Iterable<T>
Interface for the HLA data type HLAvariableArray.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddElement(T dataElement) Adds an element to this variable array.get(int index) Returns the element at the specifiedindex.iterator()Returns an iterator for the elements in this variable array.voidresize(int newSize) Resize the variable array to thenewSize.intsize()Returns the number of elements in this variable array.Methods inherited from interface hla.rti1516e.encoding.DataElement
decode, decode, encode, getEncodedLength, getOctetBoundary, toByteArrayMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
addElement
Adds an element to this variable array.- Parameters:
dataElement- element to add
-
size
int size()Returns the number of elements in this variable array.- Returns:
- the number of elements in this variable array
-
get
Returns the element at the specifiedindex.- Parameters:
index- index of element to get- Returns:
- the element at the specified
index
-
iterator
Returns an iterator for the elements in this variable array.- Specified by:
iteratorin interfaceIterable<T extends DataElement>- Returns:
- an iterator for the elements in this variable array
-
resize
void resize(int newSize) Resize the variable array to thenewSize. Uses theDataElementFactoryif new elements needs to be added.- Parameters:
newSize- the new size
-