Code example for AtomicReference

0
		initialize(); 
 
		this.windowManager = windowManager;
		battleObserver = new BattleObserver();
		timerTask = new Timer(1000 / 2, new TimerTask());
		snapshot = new AtomicReference<ITurnSnapshot>();
		lastRows = 0;
		tableModel = new BattleRankingTableModel();
		this.menu = menu;
		setTitle("Ranking"); 
	} 
 
	@Override 
	protected AbstractTableModel getTableModel() { 
		return tableModel;
	} 
 
	private void update() { 
		final ITurnSnapshot current = snapshot.get();
 
		if (lastSnapshot != current) {