Code example for AtomicLong

Methods: getAndAdd

0
	/** 
	 * Add an import to the balance of the account 
	 * @param amount import to add to the balance 
	 */ 
	public void addAmount(long amount) {
		this.balance.getAndAdd(amount);
	} 
	 
	/** 
	 * Subtract an import to the balance of the account 
	 * @param amount import to subtract to the balance 
	 */ 
	public void subtractAmount(long amount) {
		this.balance.getAndAdd(-amount);
	} 
	 
}