Code example for BigDecimal

Methods: equals

0
		if (getClass() != obj.getClass()) {
			return false; 
		} 
		final Amount other = (Amount) obj;
		if (this.amout != other.amout
				&& (this.amout == null || !this.amout.equals(other.amout))) {
			return false; 
		} 
		return true; 
	} 
 
	@Override 
	public final String toString() {
		return amout.toString();
	} 
 
	public static Amount parseOf(final String text) throws ParseException {
		NumberFormat nf = NumberFormat.getInstance(Locale.GERMAN);
		BigDecimal am = new BigDecimal(nf.parse(text).toString());
		return new Amount(am);
	}