Beispiel #1
0
  @JsonCreator
  public static Operator fromString(String name) throws IllegalArgumentException {
    Set<Operator> all = EnumSet.allOf(Operator.class);

    String ucName = name.toUpperCase();
    for (Operator type : all) {
      if (type.toString().equals(ucName)) {
        return type;
      }
    }

    throw new IllegalArgumentException(name + " cannot be converted to an enum of type Operator");
  }
Beispiel #2
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((m_FilterValue == null) ? 0 : m_FilterValue.hashCode());
   result = prime * result + ((m_Op == null) ? 0 : m_Op.hashCode());
   return result;
 }