Package net.simplace.sim.wrapper
Class DataContainer
java.lang.Object
net.simplace.sim.wrapper.DataContainer
Container that delivers the data to the client only containing simple object types like arrays.
- Author:
- Andreas Enders
-
Constructor Summary
ConstructorDescriptionDataContainer
(Collection<FWSimResultCache> aResultCaches) Create DataContainer from Result Cache onlyDataContainer
(FWSimResultCache aResultCache) Create DataContainer from Result Cache onlyDataContainer
(FWSimVarMap aVarMap) DataContainer
(FWSimVarMap aVarMap, String[] aFieldNameFilter) -
Method Summary
Modifier and TypeMethodDescriptionvoid
fill
(FWSimResultCache aResultCache, int aStartIndex, int aSize) Object[]
Object[]
getDataObjects
(int from, int to) Copies the specified range of the specified array into a new array.String[]
String[]
String[]
boolean
isLast()
void
setLast
(boolean aLast)
-
Constructor Details
-
DataContainer
- Parameters:
aVarMap
-
-
DataContainer
- Parameters:
aVarMap
-aFieldNameFilter
-
-
DataContainer
Create DataContainer from Result Cache only- Parameters:
aResultCache
-
-
DataContainer
Create DataContainer from Result Cache only- Parameters:
aResultCache
-
-
-
Method Details
-
fill
-
getHeaderStrings
- Returns:
- the Header Strings (column headers)
-
getHeaderUnits
- Returns:
- the headers columns units
-
getTypeStrings
- Returns:
- the headers columns data types
-
getDataObjects
- Returns:
- the data objects as array of arrays
-
getDataObjects
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
-