Add static method to create range.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 30 Sep 2014 05:11:36 +0000 (07:11 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 30 Sep 2014 05:11:36 +0000 (07:11 +0200)
src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java

index db6a841..a4022de 100644 (file)
@@ -59,4 +59,8 @@ public class IntegerRangePredicate implements Predicate<Integer> {
                return (value != null) && (value >= lowerBound) && (value <= upperBound);
        }
 
+       public static IntegerRangePredicate range(int lowerBound, int upperBound) {
+               return new IntegerRangePredicate(lowerBound, upperBound);
+       }
+
 }