package o; import java.util.Iterator; import java.util.NoSuchElementException; /* renamed from: o.gdy, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C14993gdy implements gdE { final InterfaceC14894gbR a; final gdE d; final boolean e; /* JADX WARN: Multi-variable type inference failed */ public C14993gdy(gdE gde, boolean z, InterfaceC14894gbR interfaceC14894gbR) { C14957gcv.e(gde, ""); C14957gcv.e(interfaceC14894gbR, ""); this.d = gde; this.e = z; this.a = interfaceC14894gbR; } /* renamed from: o.gdy$LWm */ /* loaded from: classes6.dex */ public static final class LWm implements Iterator, InterfaceC14932gcO { private C14993gdy a; private int b = -1; private T c; private final Iterator e; LWm(C14993gdy c14993gdy) { this.a = c14993gdy; this.e = c14993gdy.d.e(); } private final void e() { int i; while (true) { if (!this.e.hasNext()) { i = 0; break; } T next = this.e.next(); if (this.a.a.invoke(next).booleanValue() == this.a.e) { this.c = next; i = 1; break; } } this.b = i; } @Override // java.util.Iterator public final T next() { if (this.b == -1) { e(); } if (this.b == 0) { throw new NoSuchElementException(); } T t = this.c; this.c = null; this.b = -1; return t; } @Override // java.util.Iterator public final boolean hasNext() { if (this.b == -1) { e(); } return this.b == 1; } @Override // java.util.Iterator public final void remove() { throw new UnsupportedOperationException("Operation is not supported for read-only collection"); } } @Override // o.gdE public final Iterator e() { return new LWm(this); } }