/** * constructor * @param longValue long value */ public ExprValue(long longValue){ setLong(longValue); }
/** * mod * @param other anther <code>ExprValue</code> * @return ExprValue * @throws FormulaException */ public ExprValue mod(ExprValue other){ switch (dataType){ // NOSONAR case Long: if (other.dataType == DataType.Long){ setLong(getLong() % other.getLong()); return this; } default: } throw new FormulaException("Can not mod value between " + dataType.toString() + " and " + other.dataType.toString()); }
case Long:// NOSONAR if (other.dataType == DataType.Long){ setLong(getLong() - other.getLong()); return this; }else{
case Long: // NOSONAR if (other.dataType == DataType.Long){ setLong(getLong() * other.getLong()); return this; }else{
case Long:// NOSONAR if (other.dataType == DataType.Long){ setLong(getLong() + other.getLong()); return this; }else{
if (other.getLong() == 0) throw new FormulaException("divided by zero"); // NOSONAR setLong(getLong() / other.getLong()); return this; }else{