[java-shib-shared] branch main updated: Add methods to allow further removal of Guava dependency.
Scott Cantor
cantor.2 at osu.edu
Thu Apr 20 12:55:58 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-shib-shared.
View the commit online:
http://git.shibboleth.net/view/?p=java-shib-shared.git;a=commit;h=100ea0b0c6ea687e9ae5de5518c8f2315d37abd5
The following commit(s) were added to refs/heads/main by this push:
new 100ea0b0 Add methods to allow further removal of Guava dependency.
100ea0b0 is described below
commit 100ea0b0c6ea687e9ae5de5518c8f2315d37abd5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Apr 20 08:55:55 2023 -0400
Add methods to allow further removal of Guava dependency.
---
.../shibboleth/shared/logic/PredicateSupport.java | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/shib-support/src/main/java/net/shibboleth/shared/logic/PredicateSupport.java b/shib-support/src/main/java/net/shibboleth/shared/logic/PredicateSupport.java
index 7fc97b8f..8156be3b 100644
--- a/shib-support/src/main/java/net/shibboleth/shared/logic/PredicateSupport.java
+++ b/shib-support/src/main/java/net/shibboleth/shared/logic/PredicateSupport.java
@@ -64,6 +64,34 @@ public final class PredicateSupport {
return Predicates.<T>alwaysFalse();
}
+ /**
+ * Returns true iff the input parameter is the result of calling {@link #alwaysTrue()}.
+ *
+ * @param <T> predicate type
+ * @param p candidate to test
+ *
+ * @return true iff the input parameter is the result of calling {@link #alwaysTrue()}.
+ *
+ * @since 9.0.0
+ */
+ public static <T> boolean isAlwaysTrue(@Nonnull final Predicate<T> p) {
+ return p.equals(Predicates.alwaysTrue());
+ }
+
+ /**
+ * Returns true iff the input parameter is the result of calling {@link #alwaysFalse()}.
+ *
+ * @param <T> predicate type
+ * @param p candidate to test
+ *
+ * @return true iff the input parameter is the result of calling {@link #alwaysFalse()}.
+ *
+ * @since 9.0.0
+ */
+ public static <T> boolean isAlwaysFalse(@Nonnull final Predicate<T> p) {
+ return p.equals(Predicates.alwaysFalse());
+ }
+
/**
* Returns a predicate that returns the value of an input parameter.
*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list