Code example for Deque

Methods: isEmpty, pop

0
		 
		changed = true;
	} 
 
	public Backup pop() { 
		if (undoStack.isEmpty()) {
			return null; 
		} 
		else { 
			changed = true;
		} 
 
		return undoStack.pop();
	} 
 
	public Backup peek(){ 
		if (undoStack.isEmpty()) {
			return null; 
		} 
 
		return undoStack.peek();