@@ -0,0 +1,533 @@
+package com.yxy.chukonu.java.jdk18.func.predicate;%0A%0Aimport java.util.Objects;%0Aimport java.util.function.Predicate;%0A%0Apublic class Example %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09Predicate%3CString%3E predicate = (s) -%3E s.length() %3E 0;%0A%09%09predicate.test(%22foo%22);              // true%0A%09%09predicate.negate().test(%22foo%22);     // false%0A%0A%09%09Predicate%3CBoolean%3E nonNull = Objects::nonNull;%0A%09%09Predicate%3CBoolean%3E isNull = Objects::isNull;%0A%0A%09%09Predicate%3CString%3E isEmpty = String::isEmpty;%0A%09%09Predicate%3CString%3E isNotEmpty = isEmpty.negate();%0A%0A%09%7D%0A%0A%7D%0A

add JDK 1.8 new feature - predicate interface