jimu-decompiled/sources/com/liulishuo/filedownloader/FileDownloadQueueSet.java
2025-05-13 19:24:51 +02:00

88 lines
2.6 KiB
Java

package com.liulishuo.filedownloader;
import com.liulishuo.filedownloader.BaseDownloadTask;
import java.util.Iterator;
import java.util.List;
/* loaded from: classes.dex */
public class FileDownloadQueueSet {
private FileDownloadListener a;
private boolean b;
private List<BaseDownloadTask.FinishListener> c;
private Integer d;
private Boolean e;
private Boolean f;
private Boolean g;
private Integer h;
private Integer i;
private Object j;
private String k;
private BaseDownloadTask[] l;
public FileDownloadQueueSet(FileDownloadListener fileDownloadListener) {
if (fileDownloadListener == null) {
throw new IllegalArgumentException("create FileDownloadQueueSet must with valid target!");
}
this.a = fileDownloadListener;
}
public FileDownloadQueueSet a(List<BaseDownloadTask> list) {
this.b = true;
this.l = new BaseDownloadTask[list.size()];
list.toArray(this.l);
return this;
}
public void a() {
for (BaseDownloadTask baseDownloadTask : this.l) {
baseDownloadTask.b(this.a);
Integer num = this.d;
if (num != null) {
baseDownloadTask.c(num.intValue());
}
Boolean bool = this.e;
if (bool != null) {
baseDownloadTask.c(bool.booleanValue());
}
Boolean bool2 = this.f;
if (bool2 != null) {
baseDownloadTask.a(bool2.booleanValue());
}
Integer num2 = this.h;
if (num2 != null) {
baseDownloadTask.d(num2.intValue());
}
Integer num3 = this.i;
if (num3 != null) {
baseDownloadTask.e(num3.intValue());
}
Object obj = this.j;
if (obj != null) {
baseDownloadTask.a(obj);
}
List<BaseDownloadTask.FinishListener> list = this.c;
if (list != null) {
Iterator<BaseDownloadTask.FinishListener> it = list.iterator();
while (it.hasNext()) {
baseDownloadTask.a(it.next());
}
}
String str = this.k;
if (str != null) {
baseDownloadTask.a(str, true);
}
Boolean bool3 = this.g;
if (bool3 != null) {
baseDownloadTask.b(bool3.booleanValue());
}
baseDownloadTask.j().a();
}
FileDownloader.e().a(this.a, this.b);
}
public FileDownloadQueueSet a(int i) {
this.d = Integer.valueOf(i);
return this;
}
}