Code example for Deque

Methods: isEmpty, removeFirst

0
			invalidate();
		} 
	} 
 
	public void redo() { 
		if (redoable && !undoStack.isEmpty()) {
			lineList.add(undoStack.removeFirst());
			invalidate();
		} 
	} 
 
	public void resetTranslate() { 
		dx = 0;
		dy = 0;
		invalidate();
	} 
	 
	public void changeMode(Mode to)
	{ 
		Log.d("ModeChange","Changed mode to " + to);
		currentMode = to;