Code example for Set

Methods: contains, remove

0
        OCFile file = mImageFiles.get(i);
        Fragment fragment = null;
        if (file.isDown()) {
            fragment = new PreviewImageFragment(file, mAccount, mObsoletePositions.contains(Integer.valueOf(i)));
             
        } else if (mDownloadErrors.contains(Integer.valueOf(i))) {
            fragment = new FileDownloadFragment(file, mAccount, true);
            ((FileDownloadFragment)fragment).setError(true);
            mDownloadErrors.remove(Integer.valueOf(i));
             
        } else { 
            fragment = new FileDownloadFragment(file, mAccount, mObsoletePositions.contains(Integer.valueOf(i)));
        } 
        mObsoletePositions.remove(Integer.valueOf(i));
        return fragment;
    } 
 
    public int getFilePosition(OCFile file) {
        return mImageFiles.indexOf(file);
    }