Package hydra.lib.equality
Class Max
java.lang.Object
hydra.tools.PrimitiveFunction
hydra.lib.equality.Max
Returns the maximum of two values.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A> Function<A,A> apply(A left) Returns the maximum of two values.static <A> Aapply(A left, A right) Returns the maximum of two values.A dynamic/interpreted implementation of the function.name()The unique name of the primitive function.type()The datatype of the primitive function.Methods inherited from class hydra.tools.PrimitiveFunction
term, toNative
-
Constructor Details
-
Max
public Max()
-
-
Method Details
-
name
Description copied from class:PrimitiveFunctionThe unique name of the primitive function.- Specified by:
namein classPrimitiveFunction- Returns:
- the name of this primitive function
-
type
Description copied from class:PrimitiveFunctionThe datatype of the primitive function.- Specified by:
typein classPrimitiveFunction- Returns:
- the type scheme of this primitive function
-
implementation
Description copied from class:PrimitiveFunctionA dynamic/interpreted implementation of the function.- Specified by:
implementationin classPrimitiveFunction- Returns:
- the function implementation
-
apply
Returns the maximum of two values.- Type Parameters:
A- the comparable type- Parameters:
left- the first value- Returns:
- a function that takes the second value and returns the maximum
-
apply
public static <A> A apply(A left, A right) Returns the maximum of two values.- Type Parameters:
A- the comparable type- Parameters:
left- the first valueright- the second value- Returns:
- the maximum of the two values
-