discord-jadx/app/src/main/java/d0/f0/t.java

88 lines
2.7 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 t<T> implements Sequence<T> {
public final Sequence<T> a;
public final Function1<T, Boolean> b;
/* 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 */ t l;
public a(t tVar) {
this.l = tVar;
this.i = t.access$getSequence$p(tVar).iterator();
}
public final void a() {
if (this.i.hasNext()) {
T next = this.i.next();
if (((Boolean) t.access$getPredicate$p(this.l).invoke(next)).booleanValue()) {
this.j = 1;
this.k = next;
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 r3v0, resolved type: kotlin.jvm.functions.Function1<? super T, java.lang.Boolean> */
/* JADX WARN: Multi-variable type inference failed */
public t(Sequence<? extends T> sequence, Function1<? super T, Boolean> function1) {
m.checkNotNullParameter(sequence, "sequence");
m.checkNotNullParameter(function1, "predicate");
this.a = sequence;
this.b = function1;
}
public static final /* synthetic */ Function1 access$getPredicate$p(t tVar) {
return tVar.b;
}
public static final /* synthetic */ Sequence access$getSequence$p(t tVar) {
return tVar.a;
}
@Override // kotlin.sequences.Sequence
public Iterator<T> iterator() {
return new a(this);
}
}