Is there a Java enum anywhere in the Java libraries for greater-than, greater-than-or-equal, equal, less-than-or-equal, less-than comparisons?
It doesn't appear to be one. Fortunately, it's not too difficult to put one together.
public enum Comparison {
EQ("="), GTE(">="), GT(">"), LT("<"), LTE("<=");
private final String value;
private Comparison(String text) {
this.value = text;
}
public String getValue() {
return this.value;
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With