Code example for HashSet

Methods: add, remove, size

0
	 * @param newSelected 
	 *            the new value of the selected flag (checkbox state) 
	 */ 
	private void updateSelected(FileListItem itemView, boolean newSelected) { 
		if (newSelected) { 
			mSelectedSet.add(itemView.getIdentifer()); 
		} else { 
			mSelectedSet.remove(itemView.getIdentifer()); 
		} 
		if (mCallback != null) { 
			mCallback.onAdapterSelectedChanged(itemView, newSelected, 
					mSelectedSet.size()); 
		} 
	} 
 
	@Override 
	public View getView(int position, View convertView, ViewGroup parent) { 
		FileListItem listItem;		 
		 
		//ViewHolder holder = null; 
        if (convertView == null)