1 package jalview.util.matcher;
3 import jalview.util.MessageManager;
5 import java.util.HashMap;
9 * An enumeration for binary conditions that a user might choose from when
10 * setting filter or match conditions for values
14 Contains(false), NotContains(false), Matches(false), NotMatches(false),
15 Present(false), NotPresent(false),
16 EQ(true), NE(true), LT(true), LE(true), GT(true), GE(true);
18 private static Map<Condition, String> displayNames = new HashMap<>();
20 private boolean numeric;
22 Condition(boolean isNumeric)
28 * Answers true if the condition does a numerical comparison, else false
33 public boolean isNumeric()
39 * Answers a display name for the match condition, suitable for showing in
40 * drop-down menus. The value may be internationalized using the resource key
41 * "label.matchCondition_" with the enum name appended.
46 public String toString()
48 String name = displayNames.get(this);
54 .getStringOrReturn("label.matchCondition_", name());
55 displayNames.put(this, name);