if (temp.length() != 1 || temp.getCarType() != ConsType.NUMBER || ((BigDec) temp.getCar()).lt(BigDec.ZERO) || !((BigDec) temp.getCar()).isInt())
return null;
if (((BigDec) temp.getCar()).gt(equationOrder))
equationOrder = (BigDec) temp.getCar();
}
int highestOrder = equationOrder.intValue();
BigDec[] equationCoefficients = new BigDec[highestOrder + 1];
for (int i = 0; i < equationCoefficients.length; i++)
equationCoefficients[i] = BigDec.ZERO;
for (int i = 0; i < terms.size(); i++) {
ConsCell temp = termOrders.get(i).containsKey(var) ? parser.run(termOrders.get(i).get(var)) : new ConsCell(BigDec.ZERO, ConsType.NUMBER);