Java language level + javadoc + xml
replace with <> String builder BUILD SUCCESSFUL in 4s 39 actionable tasks: 4 executed, 35 up-to-date
This commit is contained in:
parent
802b26e870
commit
af280a7343
30 changed files with 141 additions and 379 deletions
|
|
@ -123,7 +123,7 @@ public class DownloadManagerImpl implements DownloadManager {
|
|||
Collections.sort(missions, new Comparator<DownloadMission>() {
|
||||
@Override
|
||||
public int compare(DownloadMission o1, DownloadMission o2) {
|
||||
return Long.valueOf(o1.timestamp).compareTo(o2.timestamp);
|
||||
return Long.compare(o1.timestamp, o2.timestamp);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ public class DownloadMission implements Serializable {
|
|||
public long done;
|
||||
public int threadCount = 3;
|
||||
public int finishCount;
|
||||
private final List<Long> threadPositions = new ArrayList<Long>();
|
||||
public final Map<Long, Boolean> blockState = new HashMap<Long, Boolean>();
|
||||
private final List<Long> threadPositions = new ArrayList<>();
|
||||
public final Map<Long, Boolean> blockState = new HashMap<>();
|
||||
public boolean running;
|
||||
public boolean finished;
|
||||
public boolean fallback;
|
||||
|
|
@ -77,7 +77,7 @@ public class DownloadMission implements Serializable {
|
|||
|
||||
public transient boolean recovered;
|
||||
|
||||
private transient ArrayList<WeakReference<MissionListener>> mListeners = new ArrayList<WeakReference<MissionListener>>();
|
||||
private transient ArrayList<WeakReference<MissionListener>> mListeners = new ArrayList<>();
|
||||
private transient boolean mWritingToFile;
|
||||
|
||||
private static final int NO_IDENTIFIER = -1;
|
||||
|
|
@ -232,7 +232,7 @@ public class DownloadMission implements Serializable {
|
|||
public synchronized void addListener(MissionListener listener) {
|
||||
Handler handler = new Handler(Looper.getMainLooper());
|
||||
MissionListener.handlerStore.put(listener, handler);
|
||||
mListeners.add(new WeakReference<MissionListener>(listener));
|
||||
mListeners.add(new WeakReference<>(listener));
|
||||
}
|
||||
|
||||
public synchronized void removeListener(MissionListener listener) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue