Code example for Deque

Methods: isEmpty, peek

0
 
		return undoStack.pop();
	} 
 
	public Backup peek(){ 
		if (undoStack.isEmpty()) {
			return null; 
		} 
 
		return undoStack.peek();
	} 
	 
	public boolean isChanged(){ 
		return changed;
	} 
	 
	public void clearChanged(){ 
		changed = false;
	} 
	 
	public boolean canUndo(){