Code example for BigInteger

Methods: add

0
	 
	@Override 
	public void addItem(AuctionItem item) {
		details.setItemTotal(details.getItemTotal() + 1);
		BigInteger currentBuyout = details.getTotalBuyout();
		details.setTotalBuyout(currentBuyout.add(BigInteger.valueOf(item.getBuyoutPrice())));
	} 
 
	@Override 
	public Collection<TotalSummary> getSummaryItems() {
		List<TotalSummary> ret = new LinkedList<TotalSummary>();
		ret.add(details);
		return ret;
	} 
 
	@Override 
	public void summerise() { 
		details.setAverageBuyout(
				details.getTotalBuyout().divide(BigInteger.valueOf(details.getItemTotal()))
			); 
	}