de.caff.generics.function

## Interface DoublePredicate2

- All Superinterfaces:
    java.util.function.BiPredicate<java.lang.Double,java.lang.Double>, java.util.function.Predicate<ITuple2<? extends java.lang.Double,? extends java.lang.Double>>, Predicate1<ITuple2<? extends java.lang.Double,? extends java.lang.Double>>, Predicate2<java.lang.Double,java.lang.Double>
  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 DoublePredicate2
      extends Predicate2<java.lang.Double,java.lang.Double>

  Predicate which expects two primitive double arguments.
  Since:
    October 05, 2020
  Author:
    Rammi

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static DoublePredicate2` | `EQUAL_EVEN_NAN` Predicate which checks whether two double values are equal which handles NaN values in a way that `Double.NaN == Double.NaN` is `true`.
    `static DoublePredicate2` | `EQUAL_STANDARD` Predicate which checks whether two float values are equal which handles NaN as defined by IEEE 745 so that `Float.NaN == Float.NaN` is `false`, i.e.

    - ### Fields inherited from interface de.caff.generics.function.Predicate1

      `ALWAYS_FALSE, ALWAYS_TRUE`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default boolean` | `test(java.lang.Double value1, java.lang.Double value2)` Default implementation.
    `default boolean` | `test(DoublePair pair)` Test a double pair by expanding its elements.
    `boolean` | `testDoubles(double value1, double value2)` Test the given value.

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

      `after1, after2, after3, after5, after6, after7, after8, after9, alwaysFalse, alwaysTrue, and, and, apply, areIdentical, from, isEqual, negate, or, or, partial1, partial2, partialLeft, partialRight, reverseOrder, test, xor, xor`

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

      `adapted, and_, and, and, from, isEqual, isNull, notNull, or_, or, or, testNonNull, xor_, xor, xor`

- - ### Field Detail

    - #### EQUAL_EVEN_NAN

          @NotNull
          static final DoublePredicate2 EQUAL_EVEN_NAN

      Predicate which checks whether two double values are equal which handles NaN values in a way that `Double.NaN == Double.NaN` is `true`. It also handles `-0.0 == 0.0` in a better way than standard Java using `Double.compare(double, double)` which considers them different, although above equality is `true`.
      See Also:
        `EQUAL_STANDARD`, `Primitives.areEqual(double, double)`

    - #### EQUAL_STANDARD

          @NotNull
          static final DoublePredicate2 EQUAL_STANDARD

      Predicate which checks whether two float values are equal which handles NaN as defined by IEEE 745 so that `Float.NaN == Float.NaN` is `false`, i.e. NaN is different from any other value including itself.
      See Also:
        `EQUAL_EVEN_NAN`

  - ### Method Detail

    - #### testDoubles

          boolean testDoubles(double value1,
                              double value2)

      Test the given value.
      Parameters:
        `value1` - first value to test
        `value2` - second value to test
      Returns:
        `true` if the values match the predicate, `false` otherwise

    - #### test

          default boolean test(java.lang.Double value1,
                               java.lang.Double value2)

      Default implementation. This forwards to `testDoubles(double, double)`. `Double.NaN` will be used instead of `null`.
      Specified by:
        `test` in interface `java.util.function.BiPredicate<java.lang.Double,java.lang.Double>`
      Parameters:
        `value1` - first value
        `value2` - second value
      Returns:
        `true` if the values match the predicate, `false` otherwise

    - #### test

          default boolean test(@NotNull
                               DoublePair pair)

      Test a double pair by expanding its elements.
      Parameters:
        `pair` - pair to test
      Returns:
        result of the test
      Throws:
        `java.lang.NullPointerException` - if pair is `null`