|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.ai.psg.jeva.PrimitiveOperations
Binary Operations on Primitive types (numbers and booleans) represented by their wrapper types (e.g., int represented by Integer). Numbers are widened when number types are mismatched [JavaLangSpec 1.0 sec 5.6.2]. Operations throw IllegalArgumentException.
. Operations . multiplicative: *, /, % . additive: -, + (on numbers) . comparitors: <, >, <=, >= . equality: ==, != . boolean/bitwise: &, |, ^ . bitwise: ~, <<, >>, >>> . primitive casts
| Method Summary | |
static Object |
add(Object oX,
Object oY)
Additive + |
static Object |
and(Object oX,
Object oY)
Logical and Bitwise & |
static Object |
bitwiseComplement(Object oX)
Bitwise ~ |
static Object |
castPrimitive(Class castType,
Object value)
Throws ClassCastException, though primitive type mismatches are compile time errors, not runtime errors, so caller may want to catch the ClassCastException and throw an IllegalTypeException instead. |
static Object |
castPrimitive(IClass castType,
Object value)
|
static Object |
defaultValue(Class storeType)
[JavaLangSpec1.0sec4.5.4] |
static Object |
defaultValue(IClass storeType)
|
static Object |
divide(Object oX,
Object oY)
Multiplicative / promotes to Integer [JavaLangSpec1.0sec15.16] |
static Boolean |
equals(Object oX,
Object oY)
Numerical Equality == |
static Boolean |
greaterThan(Object oX,
Object oY)
Relational > |
static Boolean |
greaterThanOrEqualTo(Object oX,
Object oY)
Relational >= |
static boolean |
isNumericValue(Object obj)
true for Number or Character |
static Object |
leftShift(Object oX,
Object oY)
Bitwise << |
static Boolean |
lessThan(Object oX,
Object oY)
Relational < |
static Boolean |
lessThanOrEqualTo(Object oX,
Object oY)
Relational <= |
static Object |
multiply(Object oX,
Object oY)
Multiplicative * promotes to Integer [JavaLangSpec1.0sec15.16] |
static Object |
negate(Object obj)
Unary '-' promotes byte, short, char to Integer [15.14.4 Unary Minus] |
static Boolean |
notEquals(Object oX,
Object oY)
Numerical InEquality != |
static Object |
or(Object oX,
Object oY)
Logical and Bitwise | |
static Object |
remainder(Object oX,
Object oY)
Multiplicative % promotes to Integer [JavaLangSpec1.0sec15.16] |
static Object |
rightSignedShift(Object oX,
Object oY)
Bitwise >> |
static Object |
rightUnsignedShift(Object oX,
Object oY)
Bitwise >>> |
static Object |
subtract(Object oX,
Object oY)
Additive - |
static Object |
unaryPlus(Object obj)
Unary '+' promotes byte, short, char to Integer [15.14.3 Unary Plus] |
static int |
unaryPromoteToInt(Object indexWrapper)
At runtime, unary promote array dims/indexes to int (char promotes to int, but unfortunately Character is not a Number) |
static Object |
xor(Object oX,
Object oY)
Logical and Bitwise ^ |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
public static final boolean isNumericValue(Object obj)
public static final int unaryPromoteToInt(Object indexWrapper)
public static final Object unaryPlus(Object obj)
public static final Object negate(Object obj)
public static final Object multiply(Object oX,
Object oY)
public static final Object divide(Object oX,
Object oY)
throws ThrowException
public static final Object remainder(Object oX,
Object oY)
throws ThrowException
public static final Object add(Object oX,
Object oY)
public static final Object subtract(Object oX,
Object oY)
public static final Boolean lessThan(Object oX,
Object oY)
public static final Boolean greaterThan(Object oX,
Object oY)
public static final Boolean lessThanOrEqualTo(Object oX,
Object oY)
public static final Boolean greaterThanOrEqualTo(Object oX,
Object oY)
public static final Boolean equals(Object oX,
Object oY)
public static final Boolean notEquals(Object oX,
Object oY)
public static final Object and(Object oX,
Object oY)
public static final Object xor(Object oX,
Object oY)
public static final Object or(Object oX,
Object oY)
public static final Object bitwiseComplement(Object oX)
public static final Object leftShift(Object oX,
Object oY)
public static final Object rightSignedShift(Object oX,
Object oY)
public static final Object rightUnsignedShift(Object oX,
Object oY)
public static final Object castPrimitive(Class castType,
Object value)
throws ClassCastException
public static final Object castPrimitive(IClass castType,
Object value)
public static final Object defaultValue(Class storeType)
public static final Object defaultValue(IClass storeType)
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-bugs@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||