Class DataContainer

java.lang.Object
net.simplace.sim.wrapper.DataContainer

public class DataContainer extends Object
Container that delivers the data to the client only containing simple object types like arrays.
Author:
Andreas Enders
  • Constructor Details

    • DataContainer

      public DataContainer(FWSimVarMap aVarMap)
      Parameters:
      aVarMap -
    • DataContainer

      public DataContainer(FWSimVarMap aVarMap, String[] aFieldNameFilter)
      Parameters:
      aVarMap -
      aFieldNameFilter -
    • DataContainer

      public DataContainer(Collection<FWSimResultCache> aResultCaches)
      Create DataContainer from Result Cache only
      Parameters:
      aResultCache -
    • DataContainer

      public DataContainer(FWSimResultCache aResultCache)
      Create DataContainer from Result Cache only
      Parameters:
      aResultCache -
  • Method Details

    • fill

      public void fill(FWSimResultCache aResultCache, int aStartIndex, int aSize)
    • getHeaderStrings

      public String[] getHeaderStrings()
      Returns:
      the Header Strings (column headers)
    • getHeaderUnits

      public String[] getHeaderUnits()
      Returns:
      the headers columns units
    • getTypeStrings

      public String[] getTypeStrings()
      Returns:
      the headers columns data types
    • getDataObjects

      public Object[] getDataObjects()
      Returns:
      the data objects as array of arrays
    • getDataObjects

      public Object[] getDataObjects(int from, int to)
      Copies the specified range of the specified array into a new array. The initial index of the range (from) must lie between zero and original.length, inclusive. The value at original[from] is placed into the initial element of the copy (unless from == original.length or from == to). Values from subsequent elements in the original array are placed into subsequent elements in the copy. The final index of the range (to), which must be greater than or equal to from, may be greater than original.length, in which case null is placed in all elements of the copy whose index is greater than or equal to original.length - from. The length of the returned array will be to - from. The resulting array is of exactly the same class as the original array.
      Parameters:
      from -
      to -
      Returns:
      a new array containing the specified range from the original array, truncated or padded with nulls to obtain the required length
      Throws:
      ArrayIndexOutOfBoundsException - - if from < 0 or from > original.length()
      IllegalArgumentException - - if from > to
    • isLast

      public boolean isLast()
      Returns:
      the last
    • setLast

      public void setLast(boolean aLast)
      Parameters:
      aLast - the last to set