if (exp instanceof ConstInteger) {
((ConstInteger) exp).inverse();
} else if (exp instanceof ConstDouble) {
((ConstDouble) exp).inverse();
} else {
expressions[index] = mode == INTEGER ? new SubInteger(new ConstInteger(
0), exp) : new SubDouble(new ConstDouble(0.0), exp);
}
break;
case NOT:
expressions[index] = new NotCheck(exp);
break;
case MUL:
expressions[index] = mode == INTEGER ? new MulInteger(exp,
expressions[index + 1]) : new MulDouble(exp, expressions[index + 1]);
break;
case DIV:
expressions[index] = mode == INTEGER ? new DivInteger(exp,
expressions[index + 1]) : new DivDouble(exp, expressions[index + 1]);
break;
case MOD:
expressions[index] = mode == INTEGER ? new ModInteger(exp,
expressions[index + 1]) : new ModDouble(exp, expressions[index + 1]);
break;
case ADD:
expressions[index] = mode == INTEGER ? new AddInteger(exp,
expressions[index + 1]) : new AddDouble(exp, expressions[index + 1]);
break;
case SUB:
expressions[index] = mode == INTEGER ? new SubInteger(exp,
expressions[index + 1]) : new SubDouble(exp, expressions[index + 1]);
break;
case GT:
expressions[index] = new GTCheck(exp, expressions[index + 1]);
break;