Interface XBiPredicate<T,U>

Type Parameters:
T - 第一个参数的类型
U - 第二个参数的类型
All Superinterfaces:
BiPredicate<T,U>, Serializable
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface XBiPredicate<T,U> extends BiPredicate<T,U>, Serializable
表示两个参数(布尔值函数)。这就是谓词的二元专门化
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    default XBiPredicate<T,U>
    and(XBiPredicate<? super T,? super U> other)
    返回一个组合断言,该断言表示此断言与另一个断言的短路逻辑与 在评估组合谓词时,如果此断言为 false,则不评估 other 断言
    default XBiPredicate<T,U>
    返回表示此断言的逻辑否定的断言
    default XBiPredicate<T,U>
    or(XBiPredicate<? super T,? super U> other)
    返回一个组合断言,该断言表示此谓词与另一个断言的短路逻辑或 在评估组合断言时,如果此断言为 true,则不评估 other 断言
    default boolean
    test(T t, U u)
    根据给定的参数评估
    boolean
    testing(T t, U u)
    根据给定的参数评估

    Methods inherited from interface java.util.function.BiPredicate

    and, or
  • Method Details

    • testing

      boolean testing(T t, U u) throws Exception
      根据给定的参数评估
      Parameters:
      t - 参数1类型
      u - 参数2类型
      Returns:
      true 如果输入参数匹配谓词,否则 false
      Throws:
      Exception - 包装的检查异常
    • test

      default boolean test(T t, U u)
      根据给定的参数评估
      Specified by:
      test in interface BiPredicate<T,U>
      Parameters:
      t - 参数1类型
      u - 参数2类型
      Returns:
      包装的检查异常
    • and

      default XBiPredicate<T,U> and(XBiPredicate<? super T,? super U> other)
      返回一个组合断言,该断言表示此断言与另一个断言的短路逻辑与 在评估组合谓词时,如果此断言为 false,则不评估 other 断言
      Parameters:
      other - 将与该断言进行逻辑与运算的断言
      Returns:
      一个组合断言,表示此断言与 other 断言的短路逻辑与
      Throws:
      NullPointerException - if other is null
    • negate

      default XBiPredicate<T,U> negate()
      返回表示此断言的逻辑否定的断言
      Specified by:
      negate in interface BiPredicate<T,U>
      Returns:
      表示此断言的逻辑否定的断言
    • or

      default XBiPredicate<T,U> or(XBiPredicate<? super T,? super U> other)
      返回一个组合断言,该断言表示此谓词与另一个断言的短路逻辑或 在评估组合断言时,如果此断言为 true,则不评估 other 断言
      Parameters:
      other - 将与此断言进行逻辑或的断言
      Returns:
      表示此断言与 other 断言的短路逻辑 OR 的组合断言
      Throws:
      NullPointerException - 如果其他为空