Code example for AtomicReference

Methods: set

0
	} 
 
	private class BattleObserver extends BattleAdaptor { 
		@Override 
		public void onBattleFinished(BattleFinishedEvent event) {
			snapshot.set(null);
		} 
 
		@Override 
		public void onTurnEnded(TurnEndedEvent event) {
			snapshot.set(event.getTurnSnapshot());
		} 
	} 
 
 
	private class TimerTask implements ActionListener { 
		public void actionPerformed(ActionEvent e) {
			update(); 
		} 
	} 
}