/** * Divides a BMoney by this value and returns a new object. * This object remains unchanged. * * @param val the money value to multiply * @return the quotient of this and given value */ public double divide(BMoney val) { return doubleValue() / val.doubleValue(); }
@Override public String doFormat(Object value) { if (value instanceof BMoney && (!isBlankZero() || !((BMoney)value).isZero())) { return format.format(((BMoney)value).doubleValue()); } return null; }
/** * Multiplies this BMoney by a double and returns a new object. * This object remains unchanged. * * @param val the double to multiply with * @return the product of this and given value */ public BMoney multiply(double val) { return new BMoney(doubleValue() * val, scale()); }
/** * Divides a BMoney by double and returns a new object. * This object remains unchanged. * * @param val the value to divide this BMoney by * @return the quotient of this and given value */ public BMoney divide(double val) { return new BMoney(doubleValue() / val, scale()); }
double d = m.doubleValue(); short s = (short) m.scale();
cell.setCellValue(money.doubleValue());