Class CustomVariableImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      CustomVariableImpl​(java.lang.String name, java.lang.String expression, java.lang.String comment, boolean lateAssigned)
      The constructor which enforces to give a name and the expression.
    • Constructor Detail

      • CustomVariableImpl

        public CustomVariableImpl​(java.lang.String name,
                                  java.lang.String expression,
                                  java.lang.String comment,
                                  boolean lateAssigned)
        The constructor which enforces to give a name and the expression.
        Parameters:
        name - the name of the variable
        expression - the expression defining the variable in madx.
        comment - a simple description of the variable
        lateAssigned - true, if assigned by ":=", false if assigned by ":".
    • Method Detail

      • getComment

        public java.lang.String getComment()
        Description copied from interface: CustomVariable
        The comment for this variable. It is retrieved from the comment string in the same line as the variable definition. (If there is one)
        Specified by:
        getComment in interface CustomVariable
        Returns:
        a comment concerning this variable
      • getExpression

        public java.lang.String getExpression()
        Description copied from interface: CustomVariable
        retrieve the expression of the variable. (The string which is used to calculate the variable within madx)
        Specified by:
        getExpression in interface CustomVariable
        Returns:
        the expression as string
      • getMadxName

        public java.lang.String getMadxName()
        Description copied from interface: MadxVariable
        retrieve the name of the variable. This must be a unique expression within the madx model.
        Specified by:
        getMadxName in interface MadxVariable
        Returns:
        the name of the variable.
      • isLateAssigned

        public boolean isLateAssigned()
        Specified by:
        isLateAssigned in interface CustomVariable
        Returns:
        true if the variable is defined by ":=", false if it is defined with "=".
      • isApertureVariable

        public boolean isApertureVariable()
        Specified by:
        isApertureVariable in interface TwissVariable
        Returns:
        true, if this variable shall be plotted as aperture (second line with minus-sign)
      • toString

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

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getKey

        public java.lang.String getKey()
        Specified by:
        getKey in interface CustomVariable
        Returns:
        a unified key
      • getUnit

        public java.lang.String getUnit()
        Specified by:
        getUnit in interface Variable
        Returns:
        a string, that represents the unit of the variable
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Variable
        Returns:
        the name of the variable (can be arbitrary)
      • getValueClass

        public java.lang.Class<?> getValueClass()
        Description copied from interface: Variable
        the type of the values which this variable represents
        Specified by:
        getValueClass in interface Variable
        Returns:
        The class of the values