Interface Throwing.BinaryOperator<T,​X extends Throwable>

Type Parameters:
T - the type of the operands and result of the operator
X - a sort of throwable that the Throwing.BinaryOperator may throw
All Superinterfaces:
Throwing.BiFunction<T,​T,​T,​X>
Enclosing class:
Throwing
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 static interface Throwing.BinaryOperator<T,​X extends Throwable> extends Throwing.BiFunction<T,​T,​T,​X>
Equivalent of BinaryOperator that may throw non-RuntimeException throwables.
  • Method Details

    • minBy

      static <T,​ X extends Throwable> Throwing.BinaryOperator<T,​X> minBy(Throwing.Comparator<? super T,​? extends X> comparator)
      Returns a Throwing.BinaryOperator which returns the lesser of two elements according to the specified Comparator.
      Type Parameters:
      T - the type of the input arguments of the comparator
      X - the sort of throwable that the returned instance may throw
      Parameters:
      comparator - a Throwing.Comparator for comparing the two values
      Returns:
      a Throwing.BinaryOperator which returns the lesser of its operands, according to the supplied Throwing.Comparator
    • maxBy

      static <T,​ X extends Throwable> Throwing.BinaryOperator<T,​X> maxBy(Throwing.Comparator<? super T,​? extends X> comparator)
      Returns a Throwing.BinaryOperator which returns the greater of two elements according to the specified Comparator.
      Type Parameters:
      T - the type of the input arguments of the comparator
      X - the sort of throwable that the returned instance may throw
      Parameters:
      comparator - a Throwing.Comparator for comparing the two values
      Returns:
      a Throwing.BinaryOperator which returns the greater of its operands, according to the supplied Throwing.Comparator