package jp.sourceforge.glad.example.domain.common.value;

import java.math.BigDecimal;

public class Quantity {

	public static final Quantity ZERO = new Quantity(BigDecimal.ZERO);

	private BigDecimal amount;

	public Quantity(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public Quantity add(Quantity x) {
		return new Quantity(getAmount().add(x.getAmount()));
	}

	public String toString() {
		return amount.toPlainString();
	}

}
