package o; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; /* loaded from: classes.dex */ public class NsV extends C17026tNn implements InterfaceC15462grE { public C17026tNn[] aD = new C17026tNn[4]; public int aF = 0; @Override // o.InterfaceC15462grE public void j() { } @Override // o.InterfaceC15462grE public final void c(C17026tNn c17026tNn) { if (c17026tNn == this || c17026tNn == null) { return; } int i = this.aF; C17026tNn[] c17026tNnArr = this.aD; if (i + 1 > c17026tNnArr.length) { this.aD = (C17026tNn[]) Arrays.copyOf(c17026tNnArr, c17026tNnArr.length << 1); } C17026tNn[] c17026tNnArr2 = this.aD; int i2 = this.aF; c17026tNnArr2[i2] = c17026tNn; this.aF = i2 + 1; } @Override // o.C17026tNn public void e(C17026tNn c17026tNn, HashMap hashMap) { super.e(c17026tNn, hashMap); NsV nsV = (NsV) c17026tNn; this.aF = 0; int i = nsV.aF; for (int i2 = 0; i2 < i; i2++) { c(hashMap.get(nsV.aD[i2])); } } @Override // o.InterfaceC15462grE public final void b() { this.aF = 0; Arrays.fill(this.aD, (Object) null); } public final void e(ArrayList arrayList, int i, fGR fgr) { for (int i2 = 0; i2 < this.aF; i2++) { C17026tNn c17026tNn = this.aD[i2]; if (!fgr.d.contains(c17026tNn)) { fgr.d.add(c17026tNn); } } for (int i3 = 0; i3 < this.aF; i3++) { tAF.d(this.aD[i3], i, arrayList, fgr); } } public final int o(int i) { for (int i2 = 0; i2 < this.aF; i2++) { C17026tNn c17026tNn = this.aD[i2]; if (i == 0 && c17026tNn.f != -1) { return c17026tNn.f; } if (i == 1 && c17026tNn.af != -1) { return c17026tNn.af; } } return -1; } }