|  1 |     | 
   package org.kuali.rice.core.api.parameter;  | 
  |  2 |     | 
     | 
  |  3 |     | 
   import javax.xml.bind.annotation.XmlEnum;  | 
  |  4 |     | 
   import javax.xml.bind.annotation.XmlEnumValue;  | 
  |  5 |     | 
   import javax.xml.bind.annotation.XmlType;  | 
  |  6 |     | 
     | 
  |  7 |     | 
     | 
  |  8 |     | 
     | 
  |  9 |     | 
     | 
  |  10 |    0 |    @XmlType(name = "EvaluationOperatorType")  | 
  |  11 |     | 
   @XmlEnum(String.class)  | 
  |  12 |     | 
   public enum EvaluationOperator { | 
  |  13 |     | 
     | 
  |  14 |     | 
             | 
  |  15 |     | 
     | 
  |  16 |     | 
     | 
  |  17 |     | 
     | 
  |  18 |     | 
     | 
  |  19 |    0 |            @XmlEnumValue(value="A") ALLOW("A"), | 
  |  20 |     | 
             | 
  |  21 |     | 
             | 
  |  22 |     | 
     | 
  |  23 |     | 
     | 
  |  24 |     | 
     | 
  |  25 |     | 
     | 
  |  26 |    0 |            @XmlEnumValue(value="D") DISALLOW("D"); | 
  |  27 |     | 
             | 
  |  28 |     | 
           private final String operatorCode;  | 
  |  29 |     | 
             | 
  |  30 |    0 |            EvaluationOperator(final String operatorCode) { | 
  |  31 |    0 |                    this.operatorCode = operatorCode;  | 
  |  32 |    0 |            }  | 
  |  33 |     | 
             | 
  |  34 |     | 
             | 
  |  35 |     | 
     | 
  |  36 |     | 
     | 
  |  37 |     | 
     | 
  |  38 |     | 
     | 
  |  39 |     | 
           public String getOperatorCode() { | 
  |  40 |    0 |                    return operatorCode;  | 
  |  41 |     | 
           }  | 
  |  42 |     | 
             | 
  |  43 |     | 
           public static EvaluationOperator fromOperatorCode(String operatorCode) { | 
  |  44 |    0 |                    if (operatorCode == null) { | 
  |  45 |    0 |                            return null;  | 
  |  46 |     | 
                   }  | 
  |  47 |    0 |                    for (EvaluationOperator operator : values()) { | 
  |  48 |    0 |                            if (operator.operatorCode.equals(operatorCode)) { | 
  |  49 |    0 |                                    return operator;  | 
  |  50 |     | 
                           }  | 
  |  51 |     | 
                   }  | 
  |  52 |    0 |                    throw new IllegalArgumentException("Failed to locate the EvaluationOperator with the given code: " + operatorCode); | 
  |  53 |     | 
           }  | 
  |  54 |     | 
             | 
  |  55 |     | 
   }  |