Interface BinaryOperator<T>
- Type Parameters:
T- the operand and result type
- All Superinterfaces:
BiFunction<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.
An operation on two values of one type that answers that type.
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic <T> BinaryOperator<T> maxBy(Comparator<? super T> comparator) The larger of two values bycomparator; the first on a tie.static <T> BinaryOperator<T> minBy(Comparator<? super T> comparator) The smaller of two values bycomparator; the first on a tie.Methods inherited from interface BiFunction
andThen, apply
-
Method Details
-
minBy
The smaller of two values bycomparator; the first on a tie.- Type Parameters:
T- the type- Parameters:
comparator- the order- Returns:
- the operator
-
maxBy
The larger of two values bycomparator; the first on a tie.- Type Parameters:
T- the type- Parameters:
comparator- the order- Returns:
- the operator
-