Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

@FunctionalInterface

public interface BinaryOperator<T>

ExtendsBiFunction<T, T, T>

An operation on two values of one type that answers that type.

Type parameters

<T>
the operand and result type

Methods

public static <T> BinaryOperator<T> minBy(Comparator<? super T> comparator)The smaller of two values by comparator; the first on a tie.
public static <T> BinaryOperator<T> maxBy(Comparator<? super T> comparator)The larger of two values by comparator; the first on a tie.

Inherited methods

Method details

minBy

public static <T> BinaryOperator<T> minBy(Comparator<? super T> comparator)
The smaller of two values by comparator; the first on a tie.

Parameters

comparator Comparator<? super T>
the order
<T>
the type

Returns

the operator

maxBy

public static <T> BinaryOperator<T> maxBy(Comparator<? super T> comparator)
The larger of two values by comparator; the first on a tie.

Parameters

comparator Comparator<? super T>
the order
<T>
the type

Returns

the operator