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 EQ(true), NE(true), LT(true), LE(true), GT(true), GE(true);
17 private static Map<Condition, String> displayNames = new HashMap<>();
19 private boolean numeric;
21 Condition(boolean isNumeric)
27 * Answers true if the condition does a numerical comparison, else false
32 public boolean isNumeric()
38 * Answers a display name for the match condition, suitable for showing in
39 * drop-down menus. The value may be internationalized using the resource key
40 * "label.matchCondition_" with the enum name appended.
45 public String toString()
47 String name = displayNames.get(this);
53 .getStringOrReturn("label.matchCondition_", name());
54 displayNames.put(this, name);