protected NumericType evaluate ( NumericType firstNumber ) { // If the argument is a real number, then use real number arithmetic, otherwise use integer arithmetic. if ( firstNumber . isInteger ( ) ) { return new IntLiteral ( - firstNumber . intValue ( ) ) ; } else { return new DoubleLiteral ( - firstNumber . doubleValue ( ) ) ; } }
Evaluates the arithmetic operator on its numeric argument .