Interface IOBinaryOperator<T>

Type Parameters:
T - the type of the operands and result of the operator
All Superinterfaces:
IOBiFunction<T,T,T>
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 IOBinaryOperator<T> extends IOBiFunction<T,T,T>
Represents an operation upon two operands of the same type, producing a result of the same type as the operands. This is a specialization of IOBiFunction for the case where the operands and the result are all of the same type.

This interface is similar to BinaryOperator except that it is allowed to throw an IOException.

Author:
Magno N A Cruz
See Also:
  • Method Details

    • minBy

      static <T> IOBinaryOperator<T> minBy(@Nonnull Comparator<? super T> comparator) throws IOException

      This method is the same as BinaryOperator.minBy(Comparator), but with a support for IOException.

      Type Parameters:
      T - The type of the input arguments of the comparator.
      Parameters:
      comparator - A Comparator for comparing both values.
      Returns:
      an IOBinaryOperator which returns the lesser of its operands, according to the supplied Comparator.
      Throws:
      IOException - if there is an I/O error performing the operation.
    • maxBy

      static <T> IOBinaryOperator<T> maxBy(@Nonnull Comparator<? super T> comparator) throws IOException

      This method is the same as BinaryOperator.maxBy(Comparator), but with a support for IOException.

      Type Parameters:
      T - The type of the input arguments of the comparator.
      Parameters:
      comparator - A Comparator for comparing both values.
      Returns:
      An IOBinaryOperator which returns the greater of its operands, according to the supplied Comparator.
      Throws:
      IOException - if there is an I/O error performing the operation