projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔥 Remove HAS_POST_FILTER from post reply interface
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
utils
/
IntegerRangePredicate.java
diff --git
a/src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java
b/src/main/java/net/pterodactylus/sone/utils/IntegerRangePredicate.java
index
db6a841
..
3a631cf
100644
(file)
--- 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
–2020
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
*
* 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.
* {@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 <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class IntegerRangePredicate implements Predicate<Integer> {
*/
public class IntegerRangePredicate implements Predicate<Integer> {
@@
-59,4
+57,8
@@
public class IntegerRangePredicate implements Predicate<Integer> {
return (value != null) && (value >= lowerBound) && (value <= upperBound);
}
return (value != null) && (value >= lowerBound) && (value <= upperBound);
}
+ public static IntegerRangePredicate range(int lowerBound, int upperBound) {
+ return new IntegerRangePredicate(lowerBound, upperBound);
+ }
+
}
}