Class TfsResultImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.result.tfs.TfsResultImpl
-
-
Constructor Summary
Constructors Constructor Description TfsResultImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddRow(java.util.List<java.lang.String> values)adds a new line of data to the dataset.voidclear()clears all internal variables.voidconvert()Converts all double data for fast retrieval.voidcreateColumn(java.lang.String key)adds an empty column to the internal data.intgetColumnCount()java.util.List<java.lang.Double>getDoubleData(MadxVariable resultVariable)returns one Column of Data as double-values.java.util.List<java.lang.Double>getDoubleData(java.lang.String key)returns one Column of Data ad double-valuesjava.lang.IntegergetElementIndex(java.lang.String elementName)java.util.List<java.lang.String>getKeys()ResultTypegetResultType()java.util.List<java.lang.String>getStringData(MadxVariable resultVariable)returns one Column of Data as String-values.java.util.List<java.lang.String>getStringData(java.lang.String key)returns the Data-Column for the given Key asArrayListTfsSummarygetSummary()MadxVarTypegetVarType(MadxVariable var)returns the type of Data for a given ResultVariableMadxVarTypegetVarType(java.lang.String key)returns the type of Data for the given keyvoidsetTfsSummary(TfsSummary tfsSummary)voidsetVarType(java.lang.String key, MadxVarType varType)sets the Type of the column corresponding to the given keyvoidverify()Validates, if all values can be correctly retrieved.
-
-
-
Method Detail
-
clear
public void clear()
clears all internal variables.
-
createColumn
public void createColumn(java.lang.String key)
adds an empty column to the internal data.- Parameters:
key- the key for this column.
-
setVarType
public void setVarType(java.lang.String key, MadxVarType varType)sets the Type of the column corresponding to the given key- Parameters:
key- the key for which to set the typevarType- the type for the key
-
addRow
public void addRow(java.util.List<java.lang.String> values)
adds a new line of data to the dataset.- Parameters:
values- the values to set as Strings.
-
verify
public void verify() throws TfsResultExceptionValidates, if all values can be correctly retrieved. If not, it throws an exception.- Throws:
TfsResultException- if the verification fails.
-
convert
public void convert() throws TfsResultExceptionConverts all double data for fast retrieval.- Throws:
TfsResultException- if the conversion from string to double values is not possible
-
getColumnCount
public int getColumnCount()
- Specified by:
getColumnCountin interfaceTfsResult- Returns:
- the amount of data-columns (amount of variables)
-
getElementIndex
public java.lang.Integer getElementIndex(java.lang.String elementName)
- Specified by:
getElementIndexin interfaceTfsResult- Parameters:
elementName- the name of the element for which one wants to retrieve the index.- Returns:
- the index of Element in a list of values.
-
getDoubleData
public java.util.List<java.lang.Double> getDoubleData(MadxVariable resultVariable)
Description copied from interface:TfsResultreturns one Column of Data as double-values.- Specified by:
getDoubleDatain interfaceTfsResult- Parameters:
resultVariable- the ResultVariable for which to get the Data.- Returns:
- the Values
-
getDoubleData
public java.util.List<java.lang.Double> getDoubleData(java.lang.String key)
Description copied from interface:TfsResultreturns one Column of Data ad double-values- Specified by:
getDoubleDatain interfaceTfsResult- Parameters:
key- the key for the data- Returns:
- the values
-
getStringData
public java.util.List<java.lang.String> getStringData(MadxVariable resultVariable)
Description copied from interface:TfsResultreturns one Column of Data as String-values.- Specified by:
getStringDatain interfaceTfsResult- Parameters:
resultVariable- the ResultVariable for which to get the Data.- Returns:
- the Values
-
getStringData
public java.util.List<java.lang.String> getStringData(java.lang.String key)
Description copied from interface:TfsResultreturns the Data-Column for the given Key asArrayList- Specified by:
getStringDatain interfaceTfsResult- Parameters:
key- the key for which to get the data.- Returns:
- the Double values
-
getKeys
public java.util.List<java.lang.String> getKeys()
-
getVarType
public MadxVarType getVarType(java.lang.String key)
Description copied from interface:TfsResultreturns the type of Data for the given key- Specified by:
getVarTypein interfaceTfsResult- Parameters:
key- the key for which to get the DataType- Returns:
- the Data-Type
-
getVarType
public MadxVarType getVarType(MadxVariable var)
Description copied from interface:TfsResultreturns the type of Data for a given ResultVariable- Specified by:
getVarTypein interfaceTfsResult- Parameters:
var- the ResultVariable- Returns:
- the VarType
-
getResultType
public final ResultType getResultType()
- Specified by:
getResultTypein interfaceResult
-
getSummary
public TfsSummary getSummary()
- Specified by:
getSummaryin interfaceTfsResult- Returns:
- the summary parameters
-
setTfsSummary
public void setTfsSummary(TfsSummary tfsSummary)
-
-