gnu.xquery.util
Class ArithOp

java.lang.Object
  extended by gnu.mapping.PropertySet
      extended by gnu.mapping.Procedure
          extended by gnu.mapping.Procedure1or2
              extended by gnu.xquery.util.ArithOp
All Implemented Interfaces:
CanInline, Inlineable, Named

public class ArithOp
extends Procedure1or2
implements CanInline, Inlineable


Field Summary
static ArithOp add
           
static ArithOp div
           
static ArithOp idiv
           
static ArithOp minus
           
static ArithOp mod
           
static ArithOp mul
           
static ArithOp plus
           
static ArithOp sub
           
 
Method Summary
 java.lang.Object apply1(java.lang.Object arg1)
           
 java.lang.Object apply2(java.lang.Object arg1, java.lang.Object arg2)
           
 void compile(ApplyExp exp, Compilation comp, Target target)
           
static java.math.BigDecimal div(java.math.BigDecimal d1, java.math.BigDecimal d2)
           
 Type getReturnType(Expression[] args)
           
 Expression inline(ApplyExp exp, ExpWalker walker)
          Inline an application of this Procedure and return result.
 
Methods inherited from class gnu.mapping.Procedure1or2
apply0, apply3, apply4, applyN, numArgs
 
Methods inherited from class gnu.mapping.Procedure
apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getSetter, getSourceLocation, match0, match1, match2, match3, match4, matchN, maxArgs, minArgs, set0, set1, setN, setSetter, setSourceLocation, toString
 
Methods inherited from class gnu.mapping.PropertySet
getName, getProperty, getSymbol, removeProperty, setName, setProperty, setProperty, setSymbol
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

add

public static final ArithOp add

sub

public static final ArithOp sub

mul

public static final ArithOp mul

div

public static final ArithOp div

idiv

public static final ArithOp idiv

mod

public static final ArithOp mod

plus

public static final ArithOp plus

minus

public static final ArithOp minus
Method Detail

apply1

public java.lang.Object apply1(java.lang.Object arg1)
                        throws java.lang.Throwable
Specified by:
apply1 in class Procedure1or2
Throws:
java.lang.Throwable

div

public static java.math.BigDecimal div(java.math.BigDecimal d1,
                                       java.math.BigDecimal d2)

apply2

public java.lang.Object apply2(java.lang.Object arg1,
                               java.lang.Object arg2)
                        throws java.lang.Throwable
Specified by:
apply2 in class Procedure1or2
Throws:
java.lang.Throwable

inline

public Expression inline(ApplyExp exp,
                         ExpWalker walker)
Description copied from interface: CanInline
Inline an application of this Procedure and return result. Can return original expression.

Specified by:
inline in interface CanInline

compile

public void compile(ApplyExp exp,
                    Compilation comp,
                    Target target)
Specified by:
compile in interface Inlineable

getReturnType

public Type getReturnType(Expression[] args)
Specified by:
getReturnType in interface Inlineable