Class TfsSummaryImpl
- java.lang.Object
-
- cern.accsoft.steering.jmad.domain.result.tfs.TfsSummaryImpl
-
- All Implemented Interfaces:
TfsSummary
public class TfsSummaryImpl extends java.lang.Object implements TfsSummary
-
-
Constructor Summary
Constructors Constructor Description TfsSummaryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(java.lang.String madxName, java.lang.String value, MadxVarType varType)adds a value to the summaryvoidconvert()converts all the values that have VarType Double to double values, so that they can be retrieved quickly afterwards.java.lang.DoublegetDoubleValue(GlobalVariable variable)retrieve a double value for the given global variable.java.lang.DoublegetDoubleValue(java.lang.String key)Retrieve one of the Twiss Summary Values...java.util.Collection<java.lang.String>getKeys()java.lang.StringgetStringValue(GlobalVariable variable)Retrieves the String representation of the data for the given variable.java.lang.StringgetStringValue(java.lang.String key)Retrieves the String representation of the data for the given key.MadxVarTypegetVarType(GlobalVariable variable)the type for the variable in this summary.MadxVarTypegetVarType(java.lang.String key)the type of the value for the given keyjava.lang.StringtoString()
-
-
-
Method Detail
-
addValue
public void addValue(java.lang.String madxName, java.lang.String value, MadxVarType varType)adds a value to the summary- Parameters:
madxName- the key of the valuevalue- the value as stringvarType- the type of the value
-
convert
public void convert() throws TfsResultExceptionconverts all the values that have VarType Double to double values, so that they can be retrieved quickly afterwards.- Throws:
TfsResultException- if the conversion fails
-
getDoubleValue
public java.lang.Double getDoubleValue(java.lang.String key)
Description copied from interface:TfsSummaryRetrieve one of the Twiss Summary Values...NOTE: Avoid this access. Better use
TfsSummary.getDoubleValue(GlobalVariable).- Specified by:
getDoubleValuein interfaceTfsSummary- Parameters:
key- the name of the summary value to get- Returns:
- the value of this global parameter
- See Also:
TfsSummary.getDoubleValue(GlobalVariable)
-
getDoubleValue
public java.lang.Double getDoubleValue(GlobalVariable variable)
Description copied from interface:TfsSummaryretrieve a double value for the given global variable.This is the preferred way to access the data for double values!
- Specified by:
getDoubleValuein interfaceTfsSummary- Parameters:
variable- the variable for which to get the value- Returns:
- the value
-
getKeys
public java.util.Collection<java.lang.String> getKeys()
- Specified by:
getKeysin interfaceTfsSummary- Returns:
- all the keys for which there exist values in this summary
-
getStringValue
public java.lang.String getStringValue(java.lang.String key)
Description copied from interface:TfsSummaryRetrieves the String representation of the data for the given key.NOTE: avoid this kind of data access! Use
TfsSummary.getStringValue(GlobalVariable)instead whenever possible!- Specified by:
getStringValuein interfaceTfsSummary- Parameters:
key- the key for which to get the data- Returns:
- the data as String
- See Also:
TfsSummary.getStringValue(GlobalVariable)
-
getStringValue
public java.lang.String getStringValue(GlobalVariable variable)
Description copied from interface:TfsSummaryRetrieves the String representation of the data for the given variable.This is the preferred way to access String data in the summary.
- Specified by:
getStringValuein interfaceTfsSummary- Parameters:
variable- the variable for which to get the string representation of the value.- Returns:
- the String representation of the data
-
getVarType
public MadxVarType getVarType(java.lang.String key)
Description copied from interface:TfsSummarythe type of the value for the given key- Specified by:
getVarTypein interfaceTfsSummary- Parameters:
key- the key for which to query the type- Returns:
- the type for the key
-
getVarType
public MadxVarType getVarType(GlobalVariable variable)
Description copied from interface:TfsSummarythe type for the variable in this summary.- Specified by:
getVarTypein interfaceTfsSummary- Parameters:
variable- the variable for which to get the type- Returns:
- the type for the variable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-