env != null
? env.getArithmeticEngine()
: getTemplate().getArithmeticEngine();
switch (operator) {
case TYPE_SUBSTRACTION :
return new SimpleNumber(ae.subtract(lhoNumber, rhoNumber));
case TYPE_MULTIPLICATION :
return new SimpleNumber(ae.multiply(lhoNumber, rhoNumber));
case TYPE_DIVISION :
return new SimpleNumber(ae.divide(lhoNumber, rhoNumber));
case TYPE_MODULO :
return new SimpleNumber(ae.modulus(lhoNumber, rhoNumber));
default:
throw new _MiscTemplateException(this, new Object[] {
"Unknown operation: ", new Integer(operator) });
}
}