apkfuckery/com.discord/smali/androidx/collection/LongSparseArray.smali

1064 lines
23 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public Landroidx/collection/LongSparseArray;
.super Ljava/lang/Object;
.source "LongSparseArray.java"
# interfaces
.implements Ljava/lang/Cloneable;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Ljava/lang/Cloneable;"
}
.end annotation
# static fields
.field private static final DELETED:Ljava/lang/Object;
# instance fields
.field private mGarbage:Z
.field private mKeys:[J
.field private mSize:I
.field private mValues:[Ljava/lang/Object;
# direct methods
.method static constructor <clinit>()V
.locals 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Landroidx/collection/LongSparseArray;->DELETED:Ljava/lang/Object;
return-void
.end method
.method public constructor <init>()V
.locals 1
const/16 v0, 0xa
invoke-direct {p0, v0}, Landroidx/collection/LongSparseArray;-><init>(I)V
return-void
.end method
.method public constructor <init>(I)V
2019-07-31 00:08:31 +00:00
.locals 1
2019-07-24 11:27:29 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, 0x0
iput-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-nez p1, :cond_0
sget-object p1, Landroidx/collection/ContainerHelpers;->EMPTY_LONGS:[J
iput-object p1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
sget-object p1, Landroidx/collection/ContainerHelpers;->EMPTY_OBJECTS:[Ljava/lang/Object;
iput-object p1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
2019-07-31 00:08:31 +00:00
return-void
2019-07-24 11:27:29 +00:00
:cond_0
invoke-static {p1}, Landroidx/collection/ContainerHelpers;->idealLongArraySize(I)I
move-result p1
2019-07-31 00:08:31 +00:00
new-array v0, p1, [J
2019-07-24 11:27:29 +00:00
2019-07-31 00:08:31 +00:00
iput-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
2019-07-24 11:27:29 +00:00
new-array p1, p1, [Ljava/lang/Object;
iput-object p1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
return-void
.end method
.method private gc()V
.locals 9
iget v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget-object v2, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
:goto_0
if-ge v4, v0, :cond_2
aget-object v6, v2, v4
sget-object v7, Landroidx/collection/LongSparseArray;->DELETED:Ljava/lang/Object;
if-eq v6, v7, :cond_1
if-eq v4, v5, :cond_0
aget-wide v7, v1, v4
aput-wide v7, v1, v5
aput-object v6, v2, v5
const/4 v6, 0x0
aput-object v6, v2, v4
:cond_0
add-int/lit8 v5, v5, 0x1
:cond_1
add-int/lit8 v4, v4, 0x1
goto :goto_0
:cond_2
iput-boolean v3, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
iput v5, p0, Landroidx/collection/LongSparseArray;->mSize:I
return-void
.end method
# virtual methods
.method public append(JLjava/lang/Object;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(JTE;)V"
}
.end annotation
iget v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
if-eqz v0, :cond_0
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
add-int/lit8 v0, v0, -0x1
aget-wide v0, v1, v0
cmp-long v2, p1, v0
if-gtz v2, :cond_0
invoke-virtual {p0, p1, p2, p3}, Landroidx/collection/LongSparseArray;->put(JLjava/lang/Object;)V
return-void
:cond_0
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_1
iget v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
array-length v1, v1
if-lt v0, v1, :cond_1
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_1
iget v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
array-length v1, v1
if-lt v0, v1, :cond_2
add-int/lit8 v1, v0, 0x1
invoke-static {v1}, Landroidx/collection/ContainerHelpers;->idealLongArraySize(I)I
move-result v1
new-array v2, v1, [J
new-array v1, v1, [Ljava/lang/Object;
iget-object v3, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
array-length v4, v3
const/4 v5, 0x0
invoke-static {v3, v5, v2, v5, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object v3, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
array-length v4, v3
invoke-static {v3, v5, v1, v5, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iput-object v2, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iput-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
:cond_2
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
aput-wide p1, v1, v0
iget-object p1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aput-object p3, p1, v0
add-int/lit8 v0, v0, 0x1
iput v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
return-void
.end method
.method public clear()V
.locals 5
iget v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
const/4 v2, 0x0
const/4 v3, 0x0
:goto_0
if-ge v3, v0, :cond_0
const/4 v4, 0x0
aput-object v4, v1, v3
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_0
iput v2, p0, Landroidx/collection/LongSparseArray;->mSize:I
iput-boolean v2, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
return-void
.end method
.method public clone()Landroidx/collection/LongSparseArray;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Landroidx/collection/LongSparseArray<",
"TE;>;"
}
.end annotation
:try_start_0
invoke-super {p0}, Ljava/lang/Object;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroidx/collection/LongSparseArray;
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
invoke-virtual {v1}, [J->clone()Ljava/lang/Object;
move-result-object v1
check-cast v1, [J
iput-object v1, v0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
invoke-virtual {v1}, [Ljava/lang/Object;->clone()Ljava/lang/Object;
move-result-object v1
check-cast v1, [Ljava/lang/Object;
iput-object v1, v0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
:try_end_0
.catch Ljava/lang/CloneNotSupportedException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
new-instance v1, Ljava/lang/AssertionError;
invoke-direct {v1, v0}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
throw v1
.end method
.method public bridge synthetic clone()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/CloneNotSupportedException;
}
.end annotation
invoke-virtual {p0}, Landroidx/collection/LongSparseArray;->clone()Landroidx/collection/LongSparseArray;
move-result-object v0
return-object v0
.end method
.method public containsKey(J)Z
.locals 0
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->indexOfKey(J)I
move-result p1
if-ltz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public containsValue(Ljava/lang/Object;)Z
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TE;)Z"
}
.end annotation
invoke-virtual {p0, p1}, Landroidx/collection/LongSparseArray;->indexOfValue(Ljava/lang/Object;)I
move-result p1
if-ltz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public delete(J)V
2019-07-31 00:08:31 +00:00
.locals 0
.annotation runtime Ljava/lang/Deprecated;
.end annotation
2019-07-29 20:14:17 +00:00
2019-07-31 00:08:31 +00:00
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->remove(J)V
2019-07-29 20:14:17 +00:00
2019-07-24 11:27:29 +00:00
return-void
.end method
.method public get(J)Ljava/lang/Object;
.locals 1
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(J)TE;"
}
.end annotation
const/4 v0, 0x0
invoke-virtual {p0, p1, p2, v0}, Landroidx/collection/LongSparseArray;->get(JLjava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public get(JLjava/lang/Object;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(JTE;)TE;"
}
.end annotation
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
invoke-static {v0, v1, p1, p2}, Landroidx/collection/ContainerHelpers;->binarySearch([JIJ)I
move-result p1
if-ltz p1, :cond_1
iget-object p2, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object v0, p2, p1
sget-object v1, Landroidx/collection/LongSparseArray;->DELETED:Ljava/lang/Object;
if-ne v0, v1, :cond_0
goto :goto_0
:cond_0
aget-object p1, p2, p1
return-object p1
:cond_1
:goto_0
return-object p3
.end method
.method public indexOfKey(J)I
.locals 2
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_0
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
invoke-static {v0, v1, p1, p2}, Landroidx/collection/ContainerHelpers;->binarySearch([JIJ)I
move-result p1
return p1
.end method
.method public indexOfValue(Ljava/lang/Object;)I
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(TE;)I"
}
.end annotation
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_0
const/4 v0, 0x0
:goto_0
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
if-ge v0, v1, :cond_2
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object v1, v1, v0
if-ne v1, p1, :cond_1
return v0
:cond_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_2
const/4 p1, -0x1
return p1
.end method
.method public isEmpty()Z
.locals 1
invoke-virtual {p0}, Landroidx/collection/LongSparseArray;->size()I
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method public keyAt(I)J
.locals 3
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_0
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
aget-wide v1, v0, p1
return-wide v1
.end method
.method public put(JLjava/lang/Object;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(JTE;)V"
}
.end annotation
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
invoke-static {v0, v1, p1, p2}, Landroidx/collection/ContainerHelpers;->binarySearch([JIJ)I
move-result v0
if-ltz v0, :cond_0
iget-object p1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aput-object p3, p1, v0
return-void
:cond_0
xor-int/lit8 v0, v0, -0x1
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
if-ge v0, v1, :cond_1
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object v2, v1, v0
sget-object v3, Landroidx/collection/LongSparseArray;->DELETED:Ljava/lang/Object;
if-ne v2, v3, :cond_1
iget-object v2, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
aput-wide p1, v2, v0
aput-object p3, v1, v0
return-void
:cond_1
iget-boolean v1, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v1, :cond_2
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
iget-object v2, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
array-length v2, v2
if-lt v1, v2, :cond_2
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
invoke-static {v0, v1, p1, p2}, Landroidx/collection/ContainerHelpers;->binarySearch([JIJ)I
move-result v0
xor-int/lit8 v0, v0, -0x1
:cond_2
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
iget-object v2, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
array-length v2, v2
if-lt v1, v2, :cond_3
add-int/lit8 v1, v1, 0x1
invoke-static {v1}, Landroidx/collection/ContainerHelpers;->idealLongArraySize(I)I
move-result v1
new-array v2, v1, [J
new-array v1, v1, [Ljava/lang/Object;
iget-object v3, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
array-length v4, v3
const/4 v5, 0x0
invoke-static {v3, v5, v2, v5, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object v3, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
array-length v4, v3
invoke-static {v3, v5, v1, v5, v4}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iput-object v2, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iput-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
:cond_3
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
sub-int v2, v1, v0
if-eqz v2, :cond_4
iget-object v2, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
add-int/lit8 v3, v0, 0x1
sub-int/2addr v1, v0
invoke-static {v2, v0, v2, v3, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
iget v2, p0, Landroidx/collection/LongSparseArray;->mSize:I
sub-int/2addr v2, v0
invoke-static {v1, v0, v1, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
:cond_4
iget-object v1, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
aput-wide p1, v1, v0
iget-object p1, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aput-object p3, p1, v0
iget p1, p0, Landroidx/collection/LongSparseArray;->mSize:I
add-int/lit8 p1, p1, 0x1
iput p1, p0, Landroidx/collection/LongSparseArray;->mSize:I
return-void
.end method
.method public putAll(Landroidx/collection/LongSparseArray;)V
.locals 5
.param p1 # Landroidx/collection/LongSparseArray;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/collection/LongSparseArray<",
"+TE;>;)V"
}
.end annotation
invoke-virtual {p1}, Landroidx/collection/LongSparseArray;->size()I
move-result v0
const/4 v1, 0x0
:goto_0
if-ge v1, v0, :cond_0
invoke-virtual {p1, v1}, Landroidx/collection/LongSparseArray;->keyAt(I)J
move-result-wide v2
invoke-virtual {p1, v1}, Landroidx/collection/LongSparseArray;->valueAt(I)Ljava/lang/Object;
move-result-object v4
invoke-virtual {p0, v2, v3, v4}, Landroidx/collection/LongSparseArray;->put(JLjava/lang/Object;)V
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_0
return-void
.end method
2019-07-31 00:08:31 +00:00
.method public putIfAbsent(JLjava/lang/Object;)Ljava/lang/Object;
.locals 1
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(JTE;)TE;"
}
.end annotation
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->get(J)Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_0
invoke-virtual {p0, p1, p2, p3}, Landroidx/collection/LongSparseArray;->put(JLjava/lang/Object;)V
:cond_0
return-object v0
.end method
2019-07-24 11:27:29 +00:00
.method public remove(J)V
2019-07-31 00:08:31 +00:00
.locals 2
2019-07-27 00:12:07 +00:00
2019-07-31 00:08:31 +00:00
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mKeys:[J
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
2019-07-27 00:12:07 +00:00
2019-07-31 00:08:31 +00:00
invoke-static {v0, v1, p1, p2}, Landroidx/collection/ContainerHelpers;->binarySearch([JIJ)I
move-result p1
if-ltz p1, :cond_0
iget-object p2, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object v0, p2, p1
sget-object v1, Landroidx/collection/LongSparseArray;->DELETED:Ljava/lang/Object;
if-eq v0, v1, :cond_0
aput-object v1, p2, p1
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
:cond_0
2019-07-29 20:14:17 +00:00
return-void
2019-07-27 00:12:07 +00:00
.end method
2019-07-31 00:08:31 +00:00
.method public remove(JLjava/lang/Object;)Z
.locals 0
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->indexOfKey(J)I
move-result p1
if-ltz p1, :cond_1
invoke-virtual {p0, p1}, Landroidx/collection/LongSparseArray;->valueAt(I)Ljava/lang/Object;
move-result-object p2
if-eq p3, p2, :cond_0
if-eqz p3, :cond_1
invoke-virtual {p3, p2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_1
:cond_0
invoke-virtual {p0, p1}, Landroidx/collection/LongSparseArray;->removeAt(I)V
const/4 p1, 0x1
return p1
:cond_1
const/4 p1, 0x0
return p1
.end method
2019-07-24 11:27:29 +00:00
.method public removeAt(I)V
.locals 3
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object v1, v0, p1
sget-object v2, Landroidx/collection/LongSparseArray;->DELETED:Ljava/lang/Object;
if-eq v1, v2, :cond_0
aput-object v2, v0, p1
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
:cond_0
return-void
.end method
2019-07-31 00:08:31 +00:00
.method public replace(JLjava/lang/Object;)Ljava/lang/Object;
.locals 1
.annotation build Landroidx/annotation/Nullable;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"(JTE;)TE;"
}
.end annotation
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->indexOfKey(J)I
move-result p1
if-ltz p1, :cond_0
iget-object p2, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object v0, p2, p1
aput-object p3, p2, p1
return-object v0
:cond_0
const/4 p1, 0x0
return-object p1
.end method
.method public replace(JLjava/lang/Object;Ljava/lang/Object;)Z
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(JTE;TE;)Z"
}
.end annotation
invoke-virtual {p0, p1, p2}, Landroidx/collection/LongSparseArray;->indexOfKey(J)I
move-result p1
if-ltz p1, :cond_1
iget-object p2, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object p2, p2, p1
if-eq p2, p3, :cond_0
if-eqz p3, :cond_1
invoke-virtual {p3, p2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result p2
if-eqz p2, :cond_1
:cond_0
iget-object p2, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aput-object p4, p2, p1
const/4 p1, 0x1
return p1
:cond_1
const/4 p1, 0x0
return p1
.end method
2019-07-24 11:27:29 +00:00
.method public setValueAt(ILjava/lang/Object;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(ITE;)V"
}
.end annotation
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_0
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aput-object p2, v0, p1
return-void
.end method
.method public size()I
.locals 1
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_0
iget v0, p0, Landroidx/collection/LongSparseArray;->mSize:I
return v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
invoke-virtual {p0}, Landroidx/collection/LongSparseArray;->size()I
move-result v0
if-gtz v0, :cond_0
const-string v0, "{}"
return-object v0
:cond_0
new-instance v0, Ljava/lang/StringBuilder;
iget v1, p0, Landroidx/collection/LongSparseArray;->mSize:I
mul-int/lit8 v1, v1, 0x1c
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
const/16 v1, 0x7b
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
const/4 v1, 0x0
:goto_0
iget v2, p0, Landroidx/collection/LongSparseArray;->mSize:I
if-ge v1, v2, :cond_3
if-lez v1, :cond_1
const-string v2, ", "
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:cond_1
invoke-virtual {p0, v1}, Landroidx/collection/LongSparseArray;->keyAt(I)J
move-result-wide v2
invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
const/16 v2, 0x3d
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p0, v1}, Landroidx/collection/LongSparseArray;->valueAt(I)Ljava/lang/Object;
move-result-object v2
if-eq v2, p0, :cond_2
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
goto :goto_1
:cond_2
const-string v2, "(this Map)"
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:goto_1
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_3
const/16 v1, 0x7d
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public valueAt(I)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)TE;"
}
.end annotation
iget-boolean v0, p0, Landroidx/collection/LongSparseArray;->mGarbage:Z
if-eqz v0, :cond_0
invoke-direct {p0}, Landroidx/collection/LongSparseArray;->gc()V
:cond_0
iget-object v0, p0, Landroidx/collection/LongSparseArray;->mValues:[Ljava/lang/Object;
aget-object p1, v0, p1
return-object p1
.end method