1 package jalview.util.matcher;
3 import jalview.util.MessageManager;
6 * An enumeration for binary conditions that a user might choose from when
7 * setting filter or match conditions for values
11 Contains(false, true), NotContains(false, true), Matches(false, true),
12 NotMatches(false, true), Present(false, false), NotPresent(false, false),
13 EQ(true, true), NE(true, true), LT(true, true), LE(true, true),
14 GT(true, true), GE(true, true);
16 private boolean numeric;
18 private boolean needsAPattern;
20 Condition(boolean isNumeric, boolean needsPattern)
23 needsAPattern = needsPattern;
27 * Answers true if the condition does a numerical comparison, else false
32 public boolean isNumeric()
38 * Answers true if the condition requires a pattern to compare against, else
43 public boolean needsAPattern()
49 * Answers a display name for the match condition, suitable for showing in
50 * drop-down menus. The value may be internationalized using the resource key
51 * "label.matchCondition_" with the enum name appended.
56 public String toString()
58 return MessageManager.getStringOrReturn("label.matchCondition_",