Files
adif-api-reverse-engineering/apk_decompiled/sources/kotlin/ranges/LongProgressionIterator.java

49 lines
2.1 KiB
Java

package kotlin.ranges;
import java.util.NoSuchElementException;
import kotlin.Metadata;
import kotlin.collections.LongIterator;
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0002\b\u0005\b\u0000\u0018\u00002\u00020\u0001B\u001d\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0003¢\u0006\u0002\u0010\u0006J\t\u0010\b\u001a\u00020\tH\u0096\u0002J\b\u0010\r\u001a\u00020\u0003H\u0016R\u000e\u0010\u0007\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\n\u001a\u00020\u0003X\u0082\u000e¢\u0006\u0002\n\u0000R\u0011\u0010\u0005\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\\u0006\u000e"}, d2 = {"Lkotlin/ranges/LongProgressionIterator;", "Lkotlin/collections/LongIterator;", "first", "", "last", "step", "(JJJ)V", "finalElement", "hasNext", "", "next", "getStep", "()J", "nextLong", "kotlin-stdlib"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class LongProgressionIterator extends LongIterator {
private final long finalElement;
private boolean hasNext;
private long next;
private final long step;
public LongProgressionIterator(long j4, long j5, long j6) {
this.step = j6;
this.finalElement = j5;
boolean z3 = false;
if (j6 <= 0 ? j4 >= j5 : j4 <= j5) {
z3 = true;
}
this.hasNext = z3;
this.next = z3 ? j4 : j5;
}
public final long getStep() {
return this.step;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.hasNext;
}
@Override // kotlin.collections.LongIterator
public long nextLong() {
long j4 = this.next;
if (j4 != this.finalElement) {
this.next = this.step + j4;
return j4;
}
if (!this.hasNext) {
throw new NoSuchElementException();
}
this.hasNext = false;
return j4;
}
}