aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/equalparts/cardbase/cardfield
diff options
context:
space:
mode:
Diffstat (limited to 'src/eu/equalparts/cardbase/cardfield')
-rw-r--r--src/eu/equalparts/cardbase/cardfield/IntegerCardField.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eu/equalparts/cardbase/cardfield/IntegerCardField.java b/src/eu/equalparts/cardbase/cardfield/IntegerCardField.java
index 4016252..3ee10e7 100644
--- a/src/eu/equalparts/cardbase/cardfield/IntegerCardField.java
+++ b/src/eu/equalparts/cardbase/cardfield/IntegerCardField.java
@@ -1,5 +1,6 @@
package eu.equalparts.cardbase.cardfield;
import eu.equalparts.cardbase.filtering.CardFiltering.Filter;
+import eu.equalparts.cardbase.utils.InputSanity;
public class IntegerCardField extends CardField<Integer> {
@@ -16,6 +17,14 @@ public class IntegerCardField extends CardField<Integer> {
return get().toString().equalsIgnoreCase(s);
case REGEX:
return get().toString().matches(s);
+ case GREATER_THAN:
+ if (InputSanity.isInteger(s)) {
+ return get() > Integer.valueOf(s);
+ }
+ case SMALLER_THAN:
+ if (InputSanity.isInteger(s)) {
+ return get() < Integer.valueOf(s);
+ }
default:
return false;
}