Code example for AtomicInteger

Methods: addAndGet

0
	public final int getValue() { 
		return myValue.get();
	} 
 
	public final int increaseValue() { 
		return myValue.addAndGet(5);
	} 
 
	public final int decreaseValue() { 
		return myValue.decrementAndGet();
	} 
 
	public boolean isIncreaseThisTurn() { 
		return myIncreaseThisTurn;
	} 
 
	public void setIncreaseThisTurn(final boolean increaseThisTurn) {
		myIncreaseThisTurn = increaseThisTurn;
	} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE