@@ -0,0 +1,3095 @@
+package com.lambdista.util;%0A%0Aimport java.util.Comparator;%0Aimport java.util.Objects;%0Aimport java.util.function.BinaryOperator;%0A%0Aimport com.lambdista.util.Try.Failure;%0Aimport com.lambdista.util.Try.Success;%0A%0A/**%0A * A %7B@link BinaryOperator%7D which simplifies working with %7B@link Try%7D values, by%0A * returning a %7B@link Failure%7D if one of the values is a failure, and passing%0A * the wrapped values to another %7B@link BinaryOperator%7D otherwise.%0A * %0A */%0A@FunctionalInterface%0Apublic interface TryBinaryOperator%3CT%3E extends BinaryOperator%3CTry%3CT%3E%3E %7B%0A%0A  /**%0A   * Returns a %7B@link TryBinaryOperator%7D which returns either a %7B@link Failure%7D,%0A   * if either of the both arguments is non-successful, or passes the wrapped%0A   * values to the specified %7B@link BinaryOperator%7D%0A   * %0A   * @param %3CT%3E the type of the input arguments of the binaryOperator%0A   * @param binaryOperator a %7B@link BinaryOperator%7D for operating on the wrapped%0A   *          values if both represent a %7B@link Success%7D%0A   * @return a %7B@link TryBinaryOperator%7D which returns a %7B@link Failure%7D if%0A   *         either of its arguments is a failure, or the result of the binary%0A   *         operation done by the passed %7B@link BinaryOperator%7D%0A   * @throws NullPointerException if the argument is null%0A   */%0A  public static %3CT%3E TryBinaryOperator%3CT%3E of(BinaryOperator%3CT%3E binaryOperator) %7B%0A    Objects.requireNonNull(binaryOperator);%0A    return (a, b) -%3E %7B%0A      if (a.isFailure()) %7B%0A        return a;%0A      %7D%0A      if (b.isFailure()) %7B%0A        return b;%0A      %7D%0A      return new Try.Success%3CT%3E(binaryOperator.apply(a.get(), b.get()));%0A    %7D;%0A  %7D%0A%0A  /**%0A   * Returns a %7B@link TryBinaryOperator%7D which returns the lesser of two%0A   * elements according to the specified %7B@code Comparator%7D, if both values are%0A   * a %7B@link Success%7D.%0A   *%0A   * @param %3CT%3E the type of the input arguments of the comparator%0A   * @param comparator a %7B@code Comparator%7D for comparing the two values%0A   * @return a %7B@code TryBinaryOperator%7D which returns the lesser of its%0A   *         operands, according to the supplied %7B@code Comparator%7D, or the%0A   *         first %7B@link Failure%7D if one is encountered.%0A   * @throws NullPointerException if the argument is null%0A   */%0A  public static %3CT%3E TryBinaryOperator%3CT%3E minBy(Comparator%3C? super T%3E comparator) %7B%0A    return TryBinaryOperator.of(BinaryOperator.minBy(comparator));%0A  %7D%0A%0A  /**%0A   * Returns a %7B@link BinaryOperator%7D which returns the greater of two elements%0A   * according to the specified %7B@code Comparator%7D, if both values are a%0A   * %7B@link Success%7D%0A   *%0A   * @param %3CT%3E the type of the input arguments of the comparator%0A   * @param comparator a %7B@code Comparator%7D for comparing the two values%0A   * @return a %7B@code TryBinaryOperator%7D which returns the greater of its%0A   *         operands, according to the supplied %7B@code Comparator%7D, or the%0A   *         first %7B@link Failure%7D if one is encountered%0A   * @throws NullPointerException if the argument is null%0A   */%0A  public static %3CT%3E TryBinaryOperator%3CT%3E maxBy(Comparator%3C? super T%3E comparator) %7B%0A    return TryBinaryOperator.of(BinaryOperator.maxBy(comparator));%0A  %7D%0A%0A%7D%0A

Add TryBinaryOperator convenience class