Code example for LinkedList

Methods: isEmpty, remove

0
		mRecycledViews.addFirst(v);
		detachViewFromParent(v);
	} 
 
	protected View getRecycledView() {
		return (mRecycledViews.isEmpty() ? null : mRecycledViews.remove());
	} 
 
	@Override 
	public void setSelection(int position) {
		mNextScreen = INVALID_SCREEN;
		mScroller.forceFinished(true);
		if (mAdapter == null)
			return; 
		 
		position = Math.max(position, 0);
		position = Math.min(position, mAdapter.getCount()-1);
 
		recycleViews(); 
 
		View currentView = makeAndAddView(position, true);