@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"); }
@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; }