101 lines
3.5 KiB
Java
101 lines
3.5 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 h<T, R, E> implements Sequence<E> {
|
|
public final Sequence<T> a;
|
|
public final Function1<T, R> b;
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
|
public final Function1<R, Iterator<E>> f2697c;
|
|
|
|
/* compiled from: Sequences.kt */
|
|
public static final class a implements Iterator<E>, d0.z.d.g0.a {
|
|
public final Iterator<T> i;
|
|
public Iterator<? extends E> j;
|
|
public final /* synthetic */ h k;
|
|
|
|
public a(h hVar) {
|
|
this.k = hVar;
|
|
this.i = h.access$getSequence$p(hVar).iterator();
|
|
}
|
|
|
|
public final boolean a() {
|
|
Iterator<? extends E> it = this.j;
|
|
if (it != null && !it.hasNext()) {
|
|
this.j = null;
|
|
}
|
|
while (true) {
|
|
if (this.j == null) {
|
|
if (this.i.hasNext()) {
|
|
Iterator<? extends E> it2 = (Iterator) h.access$getIterator$p(this.k).invoke(h.access$getTransformer$p(this.k).invoke(this.i.next()));
|
|
if (it2.hasNext()) {
|
|
this.j = it2;
|
|
break;
|
|
}
|
|
} else {
|
|
return false;
|
|
}
|
|
} else {
|
|
break;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
return a();
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public E next() {
|
|
if (a()) {
|
|
Iterator<? extends E> it = this.j;
|
|
m.checkNotNull(it);
|
|
return (E) it.next();
|
|
}
|
|
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, ? extends R> */
|
|
/* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: kotlin.jvm.functions.Function1<? super R, ? extends java.util.Iterator<? extends E>> */
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public h(Sequence<? extends T> sequence, Function1<? super T, ? extends R> function1, Function1<? super R, ? extends Iterator<? extends E>> function12) {
|
|
m.checkNotNullParameter(sequence, "sequence");
|
|
m.checkNotNullParameter(function1, "transformer");
|
|
m.checkNotNullParameter(function12, "iterator");
|
|
this.a = sequence;
|
|
this.b = function1;
|
|
this.f2697c = function12;
|
|
}
|
|
|
|
public static final /* synthetic */ Function1 access$getIterator$p(h hVar) {
|
|
return hVar.f2697c;
|
|
}
|
|
|
|
public static final /* synthetic */ Sequence access$getSequence$p(h hVar) {
|
|
return hVar.a;
|
|
}
|
|
|
|
public static final /* synthetic */ Function1 access$getTransformer$p(h hVar) {
|
|
return hVar.b;
|
|
}
|
|
|
|
@Override // kotlin.sequences.Sequence
|
|
public Iterator<E> iterator() {
|
|
return new a(this);
|
|
}
|
|
}
|