Class FunctionParameter

  • All Implemented Interfaces:
    Parameter

    public class FunctionParameter
    extends AbstractParameter
    Gives the possibility to assign a function (by function name) with given function value like tgauss(1.2) or ranf();

    NOTE: function value of null results into no values such that: tgauss(null) -> tgauss();
    • Constructor Summary

      Constructors 
      Constructor Description
      FunctionParameter​(java.lang.String name, java.lang.String functionName, java.lang.Double value, java.lang.Double functionValue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String compose()
      has to be implemented in subclass to return the correct "name=value" - syntax.
      boolean isSet()
      has to be implemented in subclass to determine if the parameter is set or not.
      • Methods inherited from class java.lang.Object

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

      • FunctionParameter

        public FunctionParameter​(java.lang.String name,
                                 java.lang.String functionName,
                                 java.lang.Double value,
                                 java.lang.Double functionValue)
        Parameters:
        name - name of the parameter
        functionName - name of the function
        value - value of the parameter
        functionValue - value of the function (null if none)
    • Method Detail

      • compose

        public java.lang.String compose()
        Description copied from interface: Parameter
        has to be implemented in subclass to return the correct "name=value" - syntax.
        Returns:
        a string representing the correct syntax for MadX
      • isSet

        public boolean isSet()
        Description copied from interface: Parameter
        has to be implemented in subclass to determine if the parameter is set or not.
        Returns:
        true, if set, false otherwise.