T
-操作数和运算符的结果类型
@FunctionalInterface public interface BinaryOperator<T> extends BiFunction<T,T,T>
BiFunction
。
这是一个functional interface其功能的方法是BiFunction.apply(Object, Object)
。
BiFunction
,
UnaryOperator
Modifier and Type | Method and Description |
---|---|
static <T> BinaryOperator<T> |
maxBy(Comparator<? super T> comparator)
返回一个
BinaryOperator 返回大两元素按指定的
Comparator 。
|
static <T> BinaryOperator<T> |
minBy(Comparator<? super T> comparator)
返回一个
BinaryOperator 返回小两元素按指定的
Comparator 。
|
andThen, apply
static <T> BinaryOperator<T> minBy(Comparator<? super T> comparator)
BinaryOperator
返回小两元素按指定的
Comparator
。
T
-比较器的输入参数的类型
comparator
-
Comparator
比较两个值
BinaryOperator
返回其操作数的较小,根据提供的
Comparator
NullPointerException
-如果参数为空
static <T> BinaryOperator<T> maxBy(Comparator<? super T> comparator)
BinaryOperator
返回大两元素按指定的
Comparator
。
T
-比较器的输入参数的类型
comparator
-
Comparator
比较两个值
BinaryOperator
返回其操作数越大,根据提供的
Comparator
NullPointerException
-如果参数为空
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.