*/
package jalview.util.matcher;
+import java.util.Locale;
+
import java.util.Objects;
/**
patternType = PatternType.String;
}
- uppercasePattern = pattern == null ? null : pattern.toUpperCase();
+ uppercasePattern = pattern == null ? null
+ : pattern.toUpperCase(Locale.ROOT);
// if we add regex conditions (e.g. matchesPattern), then
// pattern should hold the raw regex, and
boolean matchesString(String compareTo)
{
boolean matched = false;
- String upper = compareTo.toUpperCase().trim();
- switch(condition) {
+ String upper = compareTo.toUpperCase(Locale.ROOT).trim();
+ switch (condition)
+ {
case Matches:
matched = upper.equals(uppercasePattern);
break;
{
return false;
}
-
+
boolean matched = false;
- switch (condition) {
+ switch (condition)
+ {
case LT:
matched = f < compareTo;
break;
*/
return matchesFloat(compareTo, longValue);
}
-
+
boolean matched = false;
- switch (condition) {
+ switch (condition)
+ {
case LT:
matched = val < longValue;
break;
default:
break;
}
-
+
return matched;
}