what-the-bank/sources/o/C4002bNM.java

34 lines
1.0 KiB
Java

package o;
import java.util.ArrayList;
import java.util.HashSet;
import o.RDy;
/* renamed from: o.bNM, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C4002bNM<T> {
public final RDy.Sts<ArrayList<T>> c = new RDy.RVV(10);
public final DFj<T, ArrayList<T>> a = new DFj<>();
public final ArrayList<T> d = new ArrayList<>();
public final HashSet<T> e = new HashSet<>();
public final void b(T t, ArrayList<T> arrayList, HashSet<T> hashSet) {
if (arrayList.contains(t)) {
return;
}
if (hashSet.contains(t)) {
throw new RuntimeException("This graph contains cyclic dependencies");
}
hashSet.add(t);
ArrayList<T> arrayList2 = this.a.get(t);
if (arrayList2 != null) {
int size = arrayList2.size();
for (int i = 0; i < size; i++) {
b(arrayList2.get(i), arrayList, hashSet);
}
}
hashSet.remove(t);
arrayList.add(t);
}
}