2023-04-23 22:45:59 +08:00
|
|
|
package xyz.zhouxy.plusone.commons.function;
|
|
|
|
|
|
|
|
import java.util.function.Predicate;
|
|
|
|
|
2023-04-30 08:56:27 +08:00
|
|
|
public class Predicates {
|
2023-04-23 22:45:59 +08:00
|
|
|
|
2023-04-30 08:56:27 +08:00
|
|
|
public static <T> Predicate<T> of(Predicate<? super T> predicate) {
|
2023-04-23 22:45:59 +08:00
|
|
|
return predicate::test;
|
|
|
|
}
|
2023-04-30 08:56:27 +08:00
|
|
|
|
|
|
|
private Predicates() {
|
|
|
|
throw new IllegalStateException("Utility class");
|
|
|
|
}
|
2023-04-23 22:45:59 +08:00
|
|
|
}
|