diff --git a/pom.xml b/pom.xml
index 2544b51..bb2b9c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,6 +28,13 @@
${jackson.version}
+
+ org.apache.commons
+ commons-lang3
+ 3.12.0
+ test
+
+
ch.qos.logback
logback-classic
diff --git a/src/main/java/xyz/zhouxy/plusone/commons/function/Predicates.java b/src/main/java/xyz/zhouxy/plusone/commons/function/Predicates.java
new file mode 100644
index 0000000..d0ee32c
--- /dev/null
+++ b/src/main/java/xyz/zhouxy/plusone/commons/function/Predicates.java
@@ -0,0 +1,10 @@
+package xyz.zhouxy.plusone.commons.function;
+
+import java.util.function.Predicate;
+
+public class Predicates {
+
+ public final Predicate of(Predicate super T> predicate) {
+ return predicate::test;
+ }
+}
diff --git a/src/test/java/xyz/zhouxy/plusone/commons/function/FunctionTests.java b/src/test/java/xyz/zhouxy/plusone/commons/function/FunctionTests.java
new file mode 100644
index 0000000..ddf94b1
--- /dev/null
+++ b/src/test/java/xyz/zhouxy/plusone/commons/function/FunctionTests.java
@@ -0,0 +1,22 @@
+package xyz.zhouxy.plusone.commons.function;
+
+import java.util.function.Predicate;
+
+import org.apache.commons.lang3.StringUtils;
+import org.junit.jupiter.api.Test;
+import xyz.zhouxy.plusone.commons.util.Assert;
+
+class FunctionTests {
+
+ @Test
+ void test() {
+ String str = "";
+ Predicate predicate = new Predicates().of(this::nonNull)
+ .or(StringUtils::isNotBlank);
+ Assert.isTrue(predicate.test(str), "未通过");
+ }
+
+ boolean nonNull(Object obj) {
+ return obj != null;
+ }
+}