private static boolean confirmNoFileConflicts(Set<UpdatedFile> updatedFiles1, Set<UpdatedFile> updatedFiles2) {

        for (Iterator<UpdatedFile> iter1 = updatedFiles1.iterator(); iter1.hasNext();) {
            UpdatedFile currFile1 = iter1.next();
            for (Iterator<UpdatedFile> iter2 = updatedFiles2.iterator(); iter2.hasNext();) {
                UpdatedFile currFile2 = iter2.next();
                if (currFile1.getId().equals(currFile2.getId())) {
                    return false;
                }
            }
        }
        return true;
    }
private static boolean confirmNoFileConflicts ( Set < UpdatedFile > updatedFiles1 , Set < UpdatedFile > updatedFiles2 ) { for ( Iterator < UpdatedFile > iter1 = updatedFiles1 . iterator ( ) ; iter1 . hasNext ( ) ; ) { UpdatedFile currFile1 = iter1 . next ( ) ; for ( Iterator < UpdatedFile > iter2 = updatedFiles2 . iterator ( ) ; iter2 . hasNext ( ) ; ) { UpdatedFile currFile2 = iter2 . next ( ) ; if ( currFile1 . getId ( ) . equals ( currFile2 . getId ( ) ) ) { return false ; } } } return true ; }
Confirms that UpdatedFile lists does not contain any common files

@param updatedFiles1
@param updatedFiles2
@return Return true if there are no conflicts and return false otherwise