20230529 java.util.function.Predicate

介绍

  • java.util.function.Predicate
  • 接口声明
@FunctionalInterface
public interface Predicate<T>

API

static

  • isEqual
    • <T> Predicate<T> isEqual(Object targetRef)
    • 比较相等,类似 Objects.equals
  • not
    • <T> Predicate<T> not(Predicate<? super T> target)

public

  • test
    • boolean test(T t);

default

  • and
    • Predicate<T> and(Predicate<? super T> other)
  • or
    • Predicate<T> or(Predicate<? super T> other)
  • negate
    • Predicate<T> negate()
posted @ 2023-08-30 17:16  流星<。)#)))≦  阅读(5)  评论(0编辑  收藏  举报