85 lines
2.3 KiB
Java
85 lines
2.3 KiB
Java
|
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<T> implements gdE<T> {
|
||
|
final InterfaceC14894gbR<T, Boolean> a;
|
||
|
final gdE<T> d;
|
||
|
final boolean e;
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
public C14993gdy(gdE<? extends T> gde, boolean z, InterfaceC14894gbR<? super T, Boolean> 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<T>, InterfaceC14932gcO {
|
||
|
private C14993gdy<T> a;
|
||
|
private int b = -1;
|
||
|
private T c;
|
||
|
private final Iterator<T> e;
|
||
|
|
||
|
LWm(C14993gdy<T> 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<T> e() {
|
||
|
return new LWm(this);
|
||
|
}
|
||
|
}
|