Enum MultiturnVar

  • All Implemented Interfaces:
    cern.accsoft.steering.jmad.domain.var.Variable, java.io.Serializable, java.lang.Comparable<MultiturnVar>

    public enum MultiturnVar
    extends java.lang.Enum<MultiturnVar>
    implements cern.accsoft.steering.jmad.domain.var.Variable
    This enum represents the different possible values stored in a multiturn file.

    for the moment only the ones used by aloha are implemented

    • Method Detail

      • values

        public static MultiturnVar[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (MultiturnVar c : MultiturnVar.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static MultiturnVar valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • match

        public boolean match​(java.lang.String value)
        has to return true, if the given value represents the enmu.
        Parameters:
        value - the value to test
        Returns:
        true if it is a match
      • fromTag

        public static final MultiturnVar fromTag​(java.lang.String tag)
        finds the correct Column-enum from the tag.
        Parameters:
        tag - the tag which describes the column in the file
        Returns:
        the column enum-value.
      • setValue

        public void setValue​(MultiturnDataValueImpl dataValue,
                             java.lang.String fileValue)
        has to be implemented by each enum to convert the value correctly and set it to the right property. The default is to set it as a double value with the enmu value as key.
        Parameters:
        dataValue - the datValue object to which to set the value
        fileValue - the string value to set
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface cern.accsoft.steering.jmad.domain.var.Variable
      • getUnit

        public java.lang.String getUnit()
        Specified by:
        getUnit in interface cern.accsoft.steering.jmad.domain.var.Variable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<MultiturnVar>
      • getValueClass

        public java.lang.Class<?> getValueClass()
        Specified by:
        getValueClass in interface cern.accsoft.steering.jmad.domain.var.Variable