T - the binary function input typespublic final class ComparatorFunction<T> extends Object implements BinaryFunction<T,T,Integer>
Comparator to the
BinaryFunction interface.| Modifier and Type | Field and Description |
|---|---|
static ComparatorFunction<Comparable<?>> |
INSTANCE
Basic ComparatorFunction instance.
|
| Constructor and Description |
|---|
ComparatorFunction(Comparator<? super T> comparator)
Create a new ComparatorFunction.
|
public static final ComparatorFunction<Comparable<?>> INSTANCE
public ComparatorFunction(Comparator<? super T> comparator)
comparator - to wrappublic Integer evaluate(T left, T right)
evaluate in interface BinaryFunction<T,T,Integer>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentspublic static <T> ComparatorFunction<T> instance()
T - the binary function input typesCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.