Class 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
      void addValue​(java.lang.String madxName, java.lang.String value, MadxVarType varType)
      adds a value to the summary
      void convert()
      converts all the values that have VarType Double to double values, so that they can be retrieved quickly afterwards.
      java.lang.Double getDoubleValue​(GlobalVariable variable)
      retrieve a double value for the given global variable.
      java.lang.Double getDoubleValue​(java.lang.String key)
      Retrieve one of the Twiss Summary Values...
      java.util.Collection<java.lang.String> getKeys()  
      java.lang.String getStringValue​(GlobalVariable variable)
      Retrieves the String representation of the data for the given variable.
      java.lang.String getStringValue​(java.lang.String key)
      Retrieves the String representation of the data for the given key.
      MadxVarType getVarType​(GlobalVariable variable)
      the type for the variable in this summary.
      MadxVarType getVarType​(java.lang.String key)
      the type of the value for the given key
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • TfsSummaryImpl

        public TfsSummaryImpl()
    • 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 value
        value - the value as string
        varType - the type of the value
      • convert

        public void convert()
                     throws TfsResultException
        converts 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​(GlobalVariable variable)
        Description copied from interface: TfsSummary
        retrieve a double value for the given global variable.

        This is the preferred way to access the data for double values!

        Specified by:
        getDoubleValue in interface TfsSummary
        Parameters:
        variable - the variable for which to get the value
        Returns:
        the value
      • getKeys

        public java.util.Collection<java.lang.String> getKeys()
        Specified by:
        getKeys in interface TfsSummary
        Returns:
        all the keys for which there exist values in this summary
      • getStringValue

        public java.lang.String getStringValue​(GlobalVariable variable)
        Description copied from interface: TfsSummary
        Retrieves the String representation of the data for the given variable.

        This is the preferred way to access String data in the summary.

        Specified by:
        getStringValue in interface TfsSummary
        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: TfsSummary
        the type of the value for the given key
        Specified by:
        getVarType in interface TfsSummary
        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: TfsSummary
        the type for the variable in this summary.
        Specified by:
        getVarType in interface TfsSummary
        Parameters:
        variable - the variable for which to get the type
        Returns:
        the type for the variable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object