95 lines
2.9 KiB
Java
95 lines
2.9 KiB
Java
package d0.f0;
|
|
|
|
import d0.z.d.m;
|
|
import java.util.Iterator;
|
|
import java.util.NoSuchElementException;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.sequences.Sequence;
|
|
/* compiled from: Sequences.kt */
|
|
public final class g<T> implements Sequence<T> {
|
|
public final Sequence<T> a;
|
|
public final boolean b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final Function1<T, Boolean> f2696c;
|
|
|
|
/* compiled from: Sequences.kt */
|
|
public static final class a implements Iterator<T>, d0.z.d.g0.a {
|
|
public final Iterator<T> i;
|
|
public int j = -1;
|
|
public T k;
|
|
public final /* synthetic */ g l;
|
|
|
|
public a(g gVar) {
|
|
this.l = gVar;
|
|
this.i = g.access$getSequence$p(gVar).iterator();
|
|
}
|
|
|
|
public final void a() {
|
|
while (this.i.hasNext()) {
|
|
T next = this.i.next();
|
|
if (((Boolean) g.access$getPredicate$p(this.l).invoke(next)).booleanValue() == g.access$getSendWhen$p(this.l)) {
|
|
this.k = next;
|
|
this.j = 1;
|
|
return;
|
|
}
|
|
}
|
|
this.j = 0;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
if (this.j == -1) {
|
|
a();
|
|
}
|
|
return this.j == 1;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public T next() {
|
|
if (this.j == -1) {
|
|
a();
|
|
}
|
|
if (this.j != 0) {
|
|
T t = this.k;
|
|
this.k = null;
|
|
this.j = -1;
|
|
return t;
|
|
}
|
|
throw new NoSuchElementException();
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public void remove() {
|
|
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
|
|
}
|
|
}
|
|
|
|
/* JADX DEBUG: Multi-variable search result rejected for r2v0, resolved type: kotlin.sequences.Sequence<? extends T> */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kotlin.jvm.functions.Function1<? super T, java.lang.Boolean> */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public g(Sequence<? extends T> sequence, boolean z2, Function1<? super T, Boolean> function1) {
|
|
m.checkNotNullParameter(sequence, "sequence");
|
|
m.checkNotNullParameter(function1, "predicate");
|
|
this.a = sequence;
|
|
this.b = z2;
|
|
this.f2696c = function1;
|
|
}
|
|
|
|
public static final /* synthetic */ Function1 access$getPredicate$p(g gVar) {
|
|
return gVar.f2696c;
|
|
}
|
|
|
|
public static final /* synthetic */ boolean access$getSendWhen$p(g gVar) {
|
|
return gVar.b;
|
|
}
|
|
|
|
public static final /* synthetic */ Sequence access$getSequence$p(g gVar) {
|
|
return gVar.a;
|
|
}
|
|
|
|
@Override // kotlin.sequences.Sequence
|
|
public Iterator<T> iterator() {
|
|
return new a(this);
|
|
}
|
|
}
|