T - the binary function arguments and return types.public final class Max<T> extends Object implements BinaryFunction<T,T,T>
Comparator to the
BinaryFunction interface.| Modifier and Type | Field and Description |
|---|---|
static Max<Comparable<?>> |
INSTANCE
Basic Max instance.
|
| Constructor and Description |
|---|
Max()
Create a new Max.
|
Max(Comparator<T> comparator)
Create a new Max.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
T |
evaluate(T left,
T right)
Evaluate this function.
|
int |
hashCode() |
static <T extends Comparable<?>> |
instance()
Get a Max instance.
|
static <T extends Comparable<?>> |
instance(T right)
Get a Max Function.
|
String |
toString() |
public static final Max<Comparable<?>> INSTANCE
public Max()
public Max(Comparator<T> comparator)
comparator - Comparator to usepublic T evaluate(T left, T right)
evaluate in interface BinaryFunction<T,T,T>left - the L element of the ordered pair of argumentsright - the R element of the ordered pair of argumentspublic static <T extends Comparable<?>> Max<T> instance()
T - the binary function arguments and return types.public static <T extends Comparable<?>> Function<T,T> instance(T right)
T - the binary function arguments and return types.right - the right side argument of the Max functionCopyright © 2003–2014 The Apache Software Foundation. All rights reserved.