IntProgression.smali
.class public Lkotlin/ranges/IntProgression;
.super Ljava/lang/Object;
.source "Progressions.kt"
# interfaces
.implements Ljava/lang/Iterable;
.implements Lkotlin/jvm/internal/markers/KMappedMarker;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lkotlin/ranges/IntProgression$Companion;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Ljava/lang/Iterable<",
"Ljava/lang/Integer;",
">;",
"Lkotlin/jvm/internal/markers/KMappedMarker;"
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u001c\n\u0002\u0010\u0008\n\u0002\u0008\u000b\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\u0008\u0002\u0008\u0016\u0018\u0000 \u00172\u0008\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u0017B\u001f\u0008\u0000\u0012\u0006\u0010\u0003\u001a\u00020\u0002\u0012\u0006\u0010\u0004\u001a\u00020\u0002\u0012\u0006\u0010\u0005\u001a\u00020\u0002\u00a2\u0006\u0002\u0010\u0006J\u0013\u0010\r\u001a\u00020\u000e2\u0008\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0096\u0002J\u0008\u0010\u0011\u001a\u00020\u0002H\u0016J\u0008\u0010\u0012\u001a\u00020\u000eH\u0016J\t\u0010\u0013\u001a\u00020\u0014H\u0096\u0002J\u0008\u0010\u0015\u001a\u00020\u0016H\u0016R\u0011\u0010\u0007\u001a\u00020\u0002\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u0008\u0010\tR\u0011\u0010\n\u001a\u00020\u0002\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000b\u0010\tR\u0011\u0010\u0005\u001a\u00020\u0002\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000c\u0010\t\u00a8\u0006\u0018"
}
d2 = {
"Lkotlin/ranges/IntProgression;",
"",
"",
"start",
"endInclusive",
"step",
"(III)V",
"first",
"getFirst",
"()I",
"last",
"getLast",
"getStep",
"equals",
"",
"other",
"",
"hashCode",
"isEmpty",
"iterator",
"Lkotlin/collections/IntIterator;",
"toString",
"",
"Companion",
"kotlin-stdlib"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# static fields
.field public static final Companion:Lkotlin/ranges/IntProgression$Companion;
# instance fields
.field private final first:I
.field private final last:I
.field private final step:I
# direct methods
.method static constructor <clinit>()V
.registers 2
new-instance v0, Lkotlin/ranges/IntProgression$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lkotlin/ranges/IntProgression$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lkotlin/ranges/IntProgression;->Companion:Lkotlin/ranges/IntProgression$Companion;
return-void
.end method
.method public constructor <init>(III)V
.registers 5
.line 73
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-eqz p3, :cond_1e
const/high16 v0, -0x80000000
if-eq p3, v0, :cond_14
.line 87
iput p1, p0, Lkotlin/ranges/IntProgression;->first:I
.line 92
invoke-static {p1, p2, p3}, Lkotlin/internal/ProgressionUtilKt;->getProgressionLastElement(III)I
move-result p1
iput p1, p0, Lkotlin/ranges/IntProgression;->last:I
.line 97
iput p3, p0, Lkotlin/ranges/IntProgression;->step:I
return-void
.line 81
:cond_14
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Step must be greater than Int.MIN_VALUE to avoid overflow on negation."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.line 80
:cond_1e
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Step must be non-zero."
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.registers 4
.line 105
instance-of v0, p1, Lkotlin/ranges/IntProgression;
if-eqz v0, :cond_29
invoke-virtual {p0}, Lkotlin/ranges/IntProgression;->isEmpty()Z
move-result v0
if-eqz v0, :cond_13
move-object v0, p1
check-cast v0, Lkotlin/ranges/IntProgression;
invoke-virtual {v0}, Lkotlin/ranges/IntProgression;->isEmpty()Z
move-result v0
if-nez v0, :cond_27
:cond_13
iget v0, p0, Lkotlin/ranges/IntProgression;->first:I
check-cast p1, Lkotlin/ranges/IntProgression;
iget v1, p1, Lkotlin/ranges/IntProgression;->first:I
if-ne v0, v1, :cond_29
iget v0, p0, Lkotlin/ranges/IntProgression;->last:I
iget v1, p1, Lkotlin/ranges/IntProgression;->last:I
if-ne v0, v1, :cond_29
iget v0, p0, Lkotlin/ranges/IntProgression;->step:I
iget p1, p1, Lkotlin/ranges/IntProgression;->step:I
if-ne v0, p1, :cond_29
:cond_27
const/4 p1, 0x1
goto :goto_2a
:cond_29
const/4 p1, 0x0
:goto_2a
return p1
.end method
.method public final getFirst()I
.registers 2
.line 87
iget v0, p0, Lkotlin/ranges/IntProgression;->first:I
return v0
.end method
.method public final getLast()I
.registers 2
.line 92
iget v0, p0, Lkotlin/ranges/IntProgression;->last:I
return v0
.end method
.method public final getStep()I
.registers 2
.line 97
iget v0, p0, Lkotlin/ranges/IntProgression;->step:I
return v0
.end method
.method public hashCode()I
.registers 3
.line 109
invoke-virtual {p0}, Lkotlin/ranges/IntProgression;->isEmpty()Z
move-result v0
if-eqz v0, :cond_8
const/4 v0, -0x1
goto :goto_14
:cond_8
iget v0, p0, Lkotlin/ranges/IntProgression;->first:I
mul-int/lit8 v0, v0, 0x1f
iget v1, p0, Lkotlin/ranges/IntProgression;->last:I
add-int/2addr v0, v1
mul-int/lit8 v0, v0, 0x1f
iget v1, p0, Lkotlin/ranges/IntProgression;->step:I
add-int/2addr v0, v1
:goto_14
return v0
.end method
.method public isEmpty()Z
.registers 5
.line 102
iget v0, p0, Lkotlin/ranges/IntProgression;->step:I
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_d
iget v0, p0, Lkotlin/ranges/IntProgression;->first:I
iget v3, p0, Lkotlin/ranges/IntProgression;->last:I
if-le v0, v3, :cond_14
goto :goto_15
:cond_d
iget v0, p0, Lkotlin/ranges/IntProgression;->first:I
iget v3, p0, Lkotlin/ranges/IntProgression;->last:I
if-ge v0, v3, :cond_14
goto :goto_15
:cond_14
const/4 v1, 0x0
:goto_15
return v1
.end method
.method public bridge synthetic iterator()Ljava/util/Iterator;
.registers 2
.line 72
invoke-virtual {p0}, Lkotlin/ranges/IntProgression;->iterator()Lkotlin/collections/IntIterator;
move-result-object v0
check-cast v0, Ljava/util/Iterator;
return-object v0
.end method
.method public iterator()Lkotlin/collections/IntIterator;
.registers 5
.line 99
new-instance v0, Lkotlin/ranges/IntProgressionIterator;
iget v1, p0, Lkotlin/ranges/IntProgression;->first:I
iget v2, p0, Lkotlin/ranges/IntProgression;->last:I
iget v3, p0, Lkotlin/ranges/IntProgression;->step:I
invoke-direct {v0, v1, v2, v3}, Lkotlin/ranges/IntProgressionIterator;-><init>(III)V
check-cast v0, Lkotlin/collections/IntIterator;
return-object v0
.end method
.method public toString()Ljava/lang/String;
.registers 4
.line 111
iget v0, p0, Lkotlin/ranges/IntProgression;->step:I
const-string v1, " step "
if-lez v0, :cond_20
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget v2, p0, Lkotlin/ranges/IntProgression;->first:I
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v2, ".."
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v2, p0, Lkotlin/ranges/IntProgression;->last:I
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v1, p0, Lkotlin/ranges/IntProgression;->step:I
goto :goto_3a
:cond_20
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget v2, p0, Lkotlin/ranges/IntProgression;->first:I
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string v2, " downTo "
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v2, p0, Lkotlin/ranges/IntProgression;->last:I
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v1, p0, Lkotlin/ranges/IntProgression;->step:I
neg-int v1, v1
:goto_3a
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method