library/src/main/java/com/liulishuo/filedownloader/FileDownloadList.java
void divertAndIgnoreDuplicate(
            @SuppressWarnings("SameParameterValue") final List<BaseDownloadTask.IRunningTask>
                    destination) {
        synchronized (mList) {
            for (BaseDownloadTask.IRunningTask iRunningTask : mList) {
                if (!destination.contains(iRunningTask)) {
                    destination.add(iRunningTask);
                }
            }
            mList.clear();
        }
    }
void divertAndIgnoreDuplicate(
            @SuppressWarnings("SameParameterValue") final List<BaseDownloadTask.IRunningTask>
                    destination) {
        synchronized (mList) {
            for (BaseDownloadTask.IRunningTask iRunningTask : mList) {
                if (!destination.contains(iRunningTask)) {
                    destination.add(iRunningTask);
                }
            }
            mList.clear();
        }
    }
void divertAndIgnoreDuplicate ( @ SuppressWarnings ( "SameParameterValue" ) final List < BaseDownloadTask . IRunningTask > destination ) { synchronized ( mList ) { for ( BaseDownloadTask . IRunningTask iRunningTask : mList ) { if ( ! destination . contains ( iRunningTask ) ) { destination . add ( iRunningTask ) ; } } mList . clear ( ) ; } }
Divert all data in list 2 destination list
Divert all data in list 2 destination list