Module hla.rti1516e

Interface DataElementFactory<T extends DataElement>


public interface DataElementFactory<T extends DataElement>
Interface used to populate arrays.

This example decodes a variable array of HLAinteger32BE using a factory.

 DataElementFactory factory = new DataElementFactory()
 {
    public DataElement createElement(int index)
    {
       return encoderFactory.createHLAinteger32BE();
    }
 };
 HLAvariableArray post = encoderFactory.createHLAvariableArray(factory);
 post.decode(bytes);
 
  • Method Summary

    Modifier and Type
    Method
    Description
    createElement(int index)
    Creates an element appropriate for the specified index.
  • Method Details

    • createElement

      T createElement(int index)
      Creates an element appropriate for the specified index.
      Parameters:
      index - Position in array that this element will take.
      Returns:
      Element