T - the binary function arguments and return types.public final class Max<T> extends Object implements BinaryFunction<T,T,T>, Serializable
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(Max<?> that)
Learn whether another Max is equal to this.
|
boolean |
equals(Object that) |
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 UnaryFunction.
|
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 boolean equals(Max<?> that)
that - Max to testpublic static <T extends Comparable<?>> Max<T> instance()
T - the binary function arguments and return types.public static <T extends Comparable<?>> UnaryFunction<T,T> instance(T right)
T - the binary function arguments and return types.right - the right side argument of the Max functionCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.