X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=inline;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Futils%2FIntegerRangePredicate.java;h=1fd75278c3208c0a5d910ac30b946e9b54c03c8f;hb=9b102d5ff09775e3867ad8709f22baf0ad608d30;hp=db6a841d965b0c02585ca1065aea274f102a4522;hpb=6e9a43ccd93ae125720547c0fe421dc81a54ba90;p=Sone.git
diff --git a/src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java b/src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java
index db6a841..1fd7527 100644
--- a/src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java
+++ b/src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java
@@ -1,5 +1,5 @@
/*
- * Sone - IntegerRangePredicate.java - Copyright © 2013 David Roden
+ * Sone - IntegerRangePredicate.java - Copyright © 2013â2019 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,8 +23,6 @@ import com.google.common.base.Predicate;
* {@link Predicate} that verifies that an {@link Integer} value is not
* {@code null} and is between a lower and an upper bound. Both bounds are
* inclusive.
- *
- * @author David âBombeâ Roden
*/
public class IntegerRangePredicate implements Predicate {
@@ -59,4 +57,8 @@ public class IntegerRangePredicate implements Predicate {
return (value != null) && (value >= lowerBound) && (value <= upperBound);
}
+ public static IntegerRangePredicate range(int lowerBound, int upperBound) {
+ return new IntegerRangePredicate(lowerBound, upperBound);
+ }
+
}