gnu.kawa.functions
public class NumberCompare extends ProcedureN implements CanInline, Inlineable
Field Summary | |
---|---|
static int | TRUE_IF_EQU |
static int | TRUE_IF_GRT |
static int | TRUE_IF_LSS |
static int | TRUE_IF_NAN |
static int | TRUE_IF_NEQ |
Method Summary | |
---|---|
Object | apply2(Object arg1, Object arg2) |
static boolean | apply2(int flags, Object arg1, Object arg2) |
Object | applyN(Object[] args) |
static boolean | applyWithPromotion(int flags, Object arg1, Object arg2) |
static boolean | checkCompareCode(int code, int flags) |
static int | compare(Object arg1, Object arg2, boolean exact) Compare two numbers. |
static int | compare(Object arg1, int code1, Object arg2, int code2, boolean exact) |
void | compile(ApplyExp exp, Compilation comp, Target target) |
protected Language | getLanguage() |
Type | getReturnType(Expression[] args) |
Expression | inline(ApplyExp exp, ExpWalker walker) |
static NumberCompare | make(Language language, String name, int flags) |
int | numArgs() |
static boolean | $Eq(Object arg1, Object arg2) |
static boolean | $Eq$V(Object arg1, Object arg2, Object arg3, Object[] rest) |
static boolean | $Gr(Object arg1, Object arg2) |
static boolean | $Gr$Eq(Object arg1, Object arg2) |
static boolean | $Gr$Eq$V(Object arg1, Object arg2, Object arg3, Object[] rest) |
static boolean | $Gr$V(Object arg1, Object arg2, Object arg3, Object[] rest) |
static boolean | $Ls(Object arg1, Object arg2) |
static boolean | $Ls$Eq(Object arg1, Object arg2) |
static boolean | $Ls$Eq$V(Object arg1, Object arg2, Object arg3, Object[] rest) |
static boolean | $Ls$V(Object arg1, Object arg2, Object arg3, Object[] rest) |
Parameters: exact true if we should compare exact/inexact numbers exactly (by converting the inexact number to exact), or inexactly (by "promoting" the exact to inexact) (as required for XQuery).
Returns: 1 if {@code arg1>arg2}; 0 if {@code arg1==arg2};
-1 if {@code arg1