jsint
Class Op

java.lang.Object
  extended byjsint.Op

public class Op
extends java.lang.Object

This class provides methods for those scalar operations which cannot be obtained using reflection on the standard Java libraries.

Author:
Timothy J. Hickey, Copyright 2000, tim@cs.brandeis.edu, license subsequently modified by Jscheme project members licensed under zlib licence (see license.txt)

Field Summary
static int ADD
           
static int AND
           
static int COMPLEMENT
           
static int DIV
           
static int EQ
           
static int GE
           
static int GT
           
static int IMP
           
static int LE
           
static int LSH
           
static int LT
           
static int MOD
           
static int MODULO
           
static int MUL
           
static int NE
           
static int NEGATE
           
static int OR
           
static int RSH
           
static int RSHZ
           
static int SGN
           
static int SUB
           
static int XOR
           
 
Constructor Summary
Op()
           
 
Method Summary
static java.lang.Number add(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number addMulti(Pair x)
           
static java.lang.Number and(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number charToNumber(java.lang.Character a)
           
static java.lang.Number complement(java.lang.Object a)
           
static java.lang.Number div(java.lang.Object a, java.lang.Object b)
           
static boolean eq(java.lang.Object a, java.lang.Object b)
           
static boolean eqv(java.lang.Object a, java.lang.Object b)
           
static boolean ge(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number genericBinaryMultiOp(int op, java.lang.Number acc, Pair args)
           
static boolean gt(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number imp(java.lang.Object a, java.lang.Object b)
           
static boolean le(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number leftShift(java.lang.Object a, java.lang.Object b)
           
static boolean lt(java.lang.Object a, java.lang.Object b)
           
static java.lang.Class lubNumericClass(java.lang.Class a, java.lang.Class b)
           
static java.lang.Number mod(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number modulo(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number mul(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number mulMulti(Pair x)
           
static boolean ne(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number negate(java.lang.Object a)
           
static java.lang.Character numberToChar(java.lang.Number a)
           
static java.lang.Number or(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number rightShift(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number rightShiftZ(java.lang.Object a, java.lang.Object b)
           
static boolean sameObject(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number sgn(java.lang.Object a)
           
static java.lang.Number sub(java.lang.Object a, java.lang.Object b)
           
static java.lang.Number toNumber(java.lang.Object x)
           
static java.lang.Number xor(java.lang.Object a, java.lang.Object b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD

public static final int ADD
See Also:
Constant Field Values

SUB

public static final int SUB
See Also:
Constant Field Values

MUL

public static final int MUL
See Also:
Constant Field Values

DIV

public static final int DIV
See Also:
Constant Field Values

MOD

public static final int MOD
See Also:
Constant Field Values

AND

public static final int AND
See Also:
Constant Field Values

OR

public static final int OR
See Also:
Constant Field Values

XOR

public static final int XOR
See Also:
Constant Field Values

IMP

public static final int IMP
See Also:
Constant Field Values

LSH

public static final int LSH
See Also:
Constant Field Values

RSH

public static final int RSH
See Also:
Constant Field Values

RSHZ

public static final int RSHZ
See Also:
Constant Field Values

EQ

public static final int EQ
See Also:
Constant Field Values

LT

public static final int LT
See Also:
Constant Field Values

GT

public static final int GT
See Also:
Constant Field Values

LE

public static final int LE
See Also:
Constant Field Values

GE

public static final int GE
See Also:
Constant Field Values

NE

public static final int NE
See Also:
Constant Field Values

COMPLEMENT

public static final int COMPLEMENT
See Also:
Constant Field Values

NEGATE

public static final int NEGATE
See Also:
Constant Field Values

SGN

public static final int SGN
See Also:
Constant Field Values

MODULO

public static final int MODULO
See Also:
Constant Field Values
Constructor Detail

Op

public Op()
Method Detail

add

public static java.lang.Number add(java.lang.Object a,
                                   java.lang.Object b)

sub

public static java.lang.Number sub(java.lang.Object a,
                                   java.lang.Object b)

mul

public static java.lang.Number mul(java.lang.Object a,
                                   java.lang.Object b)

div

public static java.lang.Number div(java.lang.Object a,
                                   java.lang.Object b)

mod

public static java.lang.Number mod(java.lang.Object a,
                                   java.lang.Object b)

modulo

public static java.lang.Number modulo(java.lang.Object a,
                                      java.lang.Object b)

negate

public static java.lang.Number negate(java.lang.Object a)

complement

public static java.lang.Number complement(java.lang.Object a)

sgn

public static java.lang.Number sgn(java.lang.Object a)

leftShift

public static java.lang.Number leftShift(java.lang.Object a,
                                         java.lang.Object b)

rightShift

public static java.lang.Number rightShift(java.lang.Object a,
                                          java.lang.Object b)

rightShiftZ

public static java.lang.Number rightShiftZ(java.lang.Object a,
                                           java.lang.Object b)

eq

public static boolean eq(java.lang.Object a,
                         java.lang.Object b)

lt

public static boolean lt(java.lang.Object a,
                         java.lang.Object b)

gt

public static boolean gt(java.lang.Object a,
                         java.lang.Object b)

le

public static boolean le(java.lang.Object a,
                         java.lang.Object b)

ge

public static boolean ge(java.lang.Object a,
                         java.lang.Object b)

ne

public static boolean ne(java.lang.Object a,
                         java.lang.Object b)

and

public static java.lang.Number and(java.lang.Object a,
                                   java.lang.Object b)

xor

public static java.lang.Number xor(java.lang.Object a,
                                   java.lang.Object b)

or

public static java.lang.Number or(java.lang.Object a,
                                  java.lang.Object b)

imp

public static java.lang.Number imp(java.lang.Object a,
                                   java.lang.Object b)

genericBinaryMultiOp

public static java.lang.Number genericBinaryMultiOp(int op,
                                                    java.lang.Number acc,
                                                    Pair args)

numberToChar

public static java.lang.Character numberToChar(java.lang.Number a)

charToNumber

public static java.lang.Number charToNumber(java.lang.Character a)

lubNumericClass

public static java.lang.Class lubNumericClass(java.lang.Class a,
                                              java.lang.Class b)

eqv

public static boolean eqv(java.lang.Object a,
                          java.lang.Object b)

sameObject

public static boolean sameObject(java.lang.Object a,
                                 java.lang.Object b)

addMulti

public static java.lang.Number addMulti(Pair x)

mulMulti

public static java.lang.Number mulMulti(Pair x)

toNumber

public static java.lang.Number toNumber(java.lang.Object x)