Code example for Set

Methods: add, contains

0
        if (!mViewHolders.contains(viewHolder)) {
            mViewHolders.add(viewHolder);
        } 
        viewHolder.setKey(key);
 
        if (!mLoadingImages.contains(key)) {
            mLoadingImages.add(key);
            new ImageLoaderAsyncTask(key, data).execute();
        } 
    } 
 
    @Override 
    public long getItemId(int position) {
        return position;
    } 
 
    @Override 
    public abstract int getCount(); 
 
    @Override 
    public abstract Object getItem(int position);