de.caff.generics.function

## Interface FragilePredicate2<E extends java.lang.Exception,P1,P2>

- Type Parameters:
    `E` - exception type
    `P1` - parameter type 1
    `P2` - parameter type 2
  All Superinterfaces:
    FragilePredicate1<E,ITuple2<? extends P1,? extends P2>>
  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 FragilePredicate2<E extends java.lang.Exception,P1,P2>
      extends FragilePredicate1<E,ITuple2<? extends P1,? extends P2>>

  A function with two arguments which returns a boolean value, and might throw a checked exception.

  Compared to the standard Java `BiPredicate` this functional interface allows for checked exceptions.

  Author:
    Rammi
  See Also:
    `FragilePredicate1`

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default FragilePredicate2<E,P1,P2>` | `and(java.util.function.BiPredicate<? super P1,? super P2> other)` Combine this and another predicate with logical and.
    `static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2>` | `and(FragilePredicate2<? extends X,? super T1,? super T2> pred1, FragilePredicate2<? extends X,? super T1,? super T2> pred2)` Get a predicate which is the combination of two predicates with a logical and.
    `default FragilePredicate2<E,P1,P2>` | `negate()` Get the negation of this predicate.
    `default FragilePredicate2<E,P1,P2>` | `or(java.util.function.BiPredicate<? super P1,? super P2> other)` Combine this and another predicate with logical or.
    `static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2>` | `or(FragilePredicate2<? extends X,? super T1,? super T2> pred1, FragilePredicate2<? extends X,? super T1,? super T2> pred2)` Get a predicate which is the combination of two predicates with a logical or.
    `default FragilePredicate1<E,P2>` | `partial1(P1 argument)` Get a partially applied predicate using a fix first argument.
    `default FragilePredicate1<E,P1>` | `partial2(P2 argument)` Get a partially applied predicate using a fix second argument.
    `default FragilePredicate2<E,P2,P1>` | `reverseOrder()` Get a two argument predicate which expects the arguments in reverse order.
    `default boolean` | `test(ITuple2<? extends P1,? extends P2> tuple2)` Expand a tuple into the arguments of this predicate.
    `boolean` | `test(P1 arg1, P2 arg2)` Decide whether the given combination of arguments evaluates to `true`.
    `default FragilePredicate2<E,P1,P2>` | `xor(java.util.function.BiPredicate<? super P1,? super P2> other)` Combine this and another predicate with logical exclusive or.
    `static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2>` | `xor(FragilePredicate2<? extends X,? super T1,? super T2> pred1, FragilePredicate2<? extends X,? super T1,? super T2> pred2)` Get a predicate which is the combination of two predicates with a logical exclusive or.

    - ### Methods inherited from interface de.caff.generics.function.FragilePredicate1

      `adapted, and_, and, and, or_, or, or, testNonNull, xor_, xor, xor`

- - ### Method Detail

    - #### test

          boolean test(P1 arg1,
                       P2 arg2)
                throws E extends java.lang.Exception

      Decide whether the given combination of arguments evaluates to `true`.
      Parameters:
        `arg1` - first argument
        `arg2` - second argument
      Returns:
        `true` if the combination of the given arguments evaluates to `true`, `false` otherwise
      Throws:
        `E` - checked exception thrown by implementation
        `E extends java.lang.Exception`

    - #### test

          default boolean test(@NotNull
                               ITuple2<? extends P1,? extends P2> tuple2)
                        throws E extends java.lang.Exception

      Expand a tuple into the arguments of this predicate.
      Specified by:
        `test` in interface `FragilePredicate1<E extends java.lang.Exception,ITuple2<? extends P1,? extends P2>>`
      Parameters:
        `tuple2` - tuple to expand
      Returns:
        the result of testing the expended eleeents of the tuple
      Throws:
        `E` - checked exception thrown by implementation
        `E extends java.lang.Exception`

    - #### and

          @NotNull
          default FragilePredicate2<E,P1,P2> and(@NotNull
                                                          java.util.function.BiPredicate<? super P1,? super P2> other)

      Combine this and another predicate with logical and. The result will use shortcut evaluation, so if this predicate already returns `false` the other one is not evaluated.
      Parameters:
        `other` - the other predicate to be chained with logical and
      Returns:
        predicates combined with logical and

    - #### or

          @NotNull
          default FragilePredicate2<E,P1,P2> or(@NotNull
                                                         java.util.function.BiPredicate<? super P1,? super P2> other)

      Combine this and another predicate with logical or. The result will use shortcut evaluation, so if this predicate already returns `true` the other one is not evaluated.
      Parameters:
        `other` - other predicate to be chained with logical or
      Returns:
        predicates combined with logical or

    - #### xor

          @NotNull
          default FragilePredicate2<E,P1,P2> xor(@NotNull
                                                          java.util.function.BiPredicate<? super P1,? super P2> other)

      Combine this and another predicate with logical exclusive or.
      Parameters:
        `other` - other predicate to be chained with logical exclusive or
      Returns:
        predicates combined with logical exclusive or

    - #### negate

          @NotNull
          default FragilePredicate2<E,P1,P2> negate()

      Get the negation of this predicate.
      Specified by:
        `negate` in interface `FragilePredicate1<E extends java.lang.Exception,ITuple2<? extends P1,? extends P2>>`
      Returns:
        negation of this predicate

    - #### partial1

          @NotNull
          default FragilePredicate1<E,P2> partial1(P1 argument)

      Get a partially applied predicate using a fix first argument.
      Parameters:
        `argument` - value applied for first argument
      Returns:
        partially evaluated predicate

    - #### partial2

          @NotNull
          default FragilePredicate1<E,P1> partial2(P2 argument)

      Get a partially applied predicate using a fix second argument.
      Parameters:
        `argument` - value applied for second argument
      Returns:
        partially evaluated predicate

    - #### reverseOrder

          @NotNull
          default FragilePredicate2<E,P2,P1> reverseOrder()

      Get a two argument predicate which expects the arguments in reverse order.
      Returns:
        predicate with reversed order of arguments

    - #### and

          @NotNull
          static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2> and(@NotNull
                                                                                               FragilePredicate2<? extends X,? super T1,? super T2> pred1,
                                                                                               @NotNull
                                                                                               FragilePredicate2<? extends X,? super T1,? super T2> pred2)

      Get a predicate which is the combination of two predicates with a logical and.

      The result will use shortcut evaluation, so if this predicate already returns `false` the other one is not evaluated.

      Type Parameters:
        `T1` - resulting type of first argument, which is the most extending type of both `pred1`'s first argument type and `pred2`'s first argument type, so if neither type is extending the other this method will not compile
        `T2` - resulting type of second argument, see `<T1>` for the fine print
        `X` - combined exception type
      Parameters:
        `pred1` - first predicate
        `pred2` - second predicate
      Returns:
        combination of both predicates with logical and
      See Also:
        `and(BiPredicate)`

    - #### or

          @NotNull
          static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2> or(@NotNull
                                                                                              FragilePredicate2<? extends X,? super T1,? super T2> pred1,
                                                                                              @NotNull
                                                                                              FragilePredicate2<? extends X,? super T1,? super T2> pred2)

      Get a predicate which is the combination of two predicates with a logical or.

      The result will use shortcut evaluation, so if this predicate already returns `true` the other one is not evaluated.

      Type Parameters:
        `T1` - resulting type of first argument, which is the most extending type of both `pred1`'s first argument type and `pred2`'s first argument type, so if neither type is extending the other this method will not compile
        `T2` - resulting type of second argument, see `<T1>` for the fine print
        `X` - combined exception type
      Parameters:
        `pred1` - first predicate
        `pred2` - second predicate
      Returns:
        combination of both predicates with logical or
      See Also:
        `or(BiPredicate)`

    - #### xor

          @NotNull
          static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2> xor(@NotNull
                                                                                               FragilePredicate2<? extends X,? super T1,? super T2> pred1,
                                                                                               @NotNull
                                                                                               FragilePredicate2<? extends X,? super T1,? super T2> pred2)

      Get a predicate which is the combination of two predicates with a logical exclusive or.

      The result will use shortcut evaluation, so if this predicate already returns `true` the other one is not evaluated.

      Type Parameters:
        `T1` - resulting type of first argument, which is the most extending type of both `pred1`'s first argument type and `pred2`'s first argument type, so if neither type is extending the other this method will not compile
        `T2` - resulting type of second argument, see `<T1>` for the fine print
        `X` - combined exception type
      Parameters:
        `pred1` - first predicate
        `pred2` - second predicate
      Returns:
        combination of both predicates with logical exclusive or
      See Also:
        `xor(BiPredicate)`