T
- The type of the operands and result of the operator.@FunctionalInterface public interface BinaryIOOperator<T> extends IOBiFunction<T,T,T>
IOException
throwing equivalent of BinaryOperator
.Modifier and Type | Method and Description |
---|---|
static <T> BinaryIOOperator<T> |
checked(BinaryOperator<T> operator)
Returns a binary operator that applies the
operator operator to its input, and unwraps any UncheckedIOException that is thrown
by throwing its cause . |
static <T> BinaryIOOperator<T> |
maxBy(Comparator<? super T> comparator)
Returns an
BinaryIOOperator which returns the greater of two elements according to the specified Comparator . |
static <T> BinaryIOOperator<T> |
minBy(Comparator<? super T> comparator)
Returns an
BinaryIOOperator which returns the lesser of two elements according to the specified Comparator . |
static <T> BinaryOperator<T> |
unchecked(BinaryIOOperator<T> operator)
Returns a binary operator that applies the
operator operator to its input, and wraps any IOException that is thrown in an
UncheckedIOException . |
andThen, apply, checked, unchecked
static <T> BinaryIOOperator<T> minBy(Comparator<? super T> comparator)
BinaryIOOperator
which returns the lesser of two elements according to the specified Comparator
.T
- The type of the input arguments of the comparator.comparator
- A Comparator
for comparing the two values.BinaryIOOperator
which returns the lesser of its operands, according to the supplied Comparator
.NullPointerException
- If comparator
is null
.static <T> BinaryIOOperator<T> maxBy(Comparator<? super T> comparator)
BinaryIOOperator
which returns the greater of two elements according to the specified Comparator
.T
- The type of the input arguments of the comparator.comparator
- A Comparator
for comparing the two values.BinaryOperator
which returns the greater of its operands, according to the supplied Comparator
.NullPointerException
- If comparator
is null
.static <T> BinaryOperator<T> unchecked(BinaryIOOperator<T> operator)
operator
operator to its input, and wraps any IOException
that is thrown in an
UncheckedIOException
.T
- The type of the operands and result of the operator.operator
- The binary operator to apply when the returned binary operator is applied.operator
operator to its input, and wraps any IOException
that is thrown in an
UncheckedIOException
.NullPointerException
- If operator
is null
.static <T> BinaryIOOperator<T> checked(BinaryOperator<T> operator)
operator
operator to its input, and unwraps any UncheckedIOException
that is thrown
by throwing its cause
.T
- The type of the input and output of the operator.operator
- The binary operator to apply when the returned binary operator is applied.operator
operator to its input, and unwraps any UncheckedIOException
that is thrown.NullPointerException
- If operator
is null
.Copyright © 2017–2020. All rights reserved.