Module hla.rti1516e

Interface HLAvariableArray<T extends DataElement>

All Superinterfaces:
DataElement, Iterable<T>

public interface HLAvariableArray<T extends DataElement> extends DataElement, Iterable<T>
Interface for the HLA data type HLAvariableArray.
  • Method Details

    • addElement

      void addElement(T dataElement)
      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

      T get(int index)
      Returns the element at the specified index.
      Parameters:
      index - index of element to get
      Returns:
      the element at the specified index
    • iterator

      Iterator<T> iterator()
      Returns an iterator for the elements in this variable array.
      Specified by:
      iterator in interface Iterable<T extends DataElement>
      Returns:
      an iterator for the elements in this variable array
    • resize

      void resize(int newSize)
      Resize the variable array to the newSize. Uses the DataElementFactory if new elements needs to be added.
      Parameters:
      newSize - the new size