1037 lines
18 KiB
Smali
1037 lines
18 KiB
Smali
.class public final Lcom/google/common/primitives/Ints;
|
|
.super Lcom/google/common/primitives/IntsMethodsForWeb;
|
|
.source "Ints.java"
|
|
|
|
|
|
# annotations
|
|
.annotation build Lcom/google/common/annotations/GwtCompatible;
|
|
emulated = true
|
|
.end annotation
|
|
|
|
.annotation runtime Lcom/google/common/primitives/ElementTypesAreNonnullByDefault;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/common/primitives/Ints$IntArrayAsList;,
|
|
Lcom/google/common/primitives/Ints$LexicographicalComparator;,
|
|
Lcom/google/common/primitives/Ints$IntConverter;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final BYTES:I = 0x4
|
|
|
|
.field public static final MAX_POWER_OF_TWO:I = 0x40000000
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/common/primitives/IntsMethodsForWeb;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$000([IIII)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p0, p1, p2, p3}, Lcom/google/common/primitives/Ints;->indexOf([IIII)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static synthetic access$100([IIII)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-static {p0, p1, p2, p3}, Lcom/google/common/primitives/Ints;->lastIndexOf([IIII)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static varargs asList([I)Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"([I)",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
invoke-static {}, Ljava/util/Collections;->emptyList()Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-instance v0, Lcom/google/common/primitives/Ints$IntArrayAsList;
|
|
|
|
invoke-direct {v0, p0}, Lcom/google/common/primitives/Ints$IntArrayAsList;-><init>([I)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static checkedCast(J)I
|
|
.locals 3
|
|
|
|
long-to-int v0, p0
|
|
|
|
int-to-long v1, v0
|
|
|
|
cmp-long v1, v1, p0
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
const-string v2, "Out of range: %s"
|
|
|
|
.line 1
|
|
invoke-static {v1, v2, p0, p1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static compare(II)I
|
|
.locals 0
|
|
|
|
if-ge p0, p1, :cond_0
|
|
|
|
const/4 p0, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-le p0, p1, :cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method public static varargs concat([[I)[I
|
|
.locals 7
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
move v3, v2
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_0
|
|
|
|
aget-object v4, p0, v2
|
|
|
|
.line 2
|
|
array-length v4, v4
|
|
|
|
add-int/2addr v3, v4
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-array v0, v3, [I
|
|
|
|
.line 4
|
|
array-length v2, p0
|
|
|
|
move v3, v1
|
|
|
|
move v4, v3
|
|
|
|
:goto_1
|
|
if-ge v3, v2, :cond_1
|
|
|
|
aget-object v5, p0, v3
|
|
|
|
.line 5
|
|
array-length v6, v5
|
|
|
|
invoke-static {v5, v1, v0, v4, v6}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
|
|
|
|
.line 6
|
|
array-length v5, v5
|
|
|
|
add-int/2addr v4, v5
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static constrainToRange(III)I
|
|
.locals 2
|
|
.annotation build Lcom/google/common/annotations/Beta;
|
|
.end annotation
|
|
|
|
if-gt p1, p2, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
const-string v1, "min (%s) must be less than or equal to max (%s)"
|
|
|
|
.line 1
|
|
invoke-static {v0, v1, p1, p2}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;II)V
|
|
|
|
.line 2
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0, p2}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static contains([II)Z
|
|
.locals 4
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_1
|
|
|
|
aget v3, p0, v2
|
|
|
|
if-ne v3, p1, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public static ensureCapacity([III)[I
|
|
.locals 4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-ltz p1, :cond_0
|
|
|
|
move v2, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
const-string v3, "Invalid minLength: %s"
|
|
|
|
.line 1
|
|
invoke-static {v2, v3, p1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;I)V
|
|
|
|
if-ltz p2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move v0, v1
|
|
|
|
:goto_1
|
|
const-string v1, "Invalid padding: %s"
|
|
|
|
.line 2
|
|
invoke-static {v0, v1, p2}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;I)V
|
|
|
|
.line 3
|
|
array-length v0, p0
|
|
|
|
if-ge v0, p1, :cond_2
|
|
|
|
add-int/2addr p1, p2
|
|
|
|
invoke-static {p0, p1}, Ljava/util/Arrays;->copyOf([II)[I
|
|
|
|
move-result-object p0
|
|
|
|
:cond_2
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static fromByteArray([B)I
|
|
.locals 6
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x4
|
|
|
|
if-lt v0, v3, :cond_0
|
|
|
|
move v0, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v2
|
|
|
|
:goto_0
|
|
array-length v4, p0
|
|
|
|
const-string v5, "array too small: %s < %s"
|
|
|
|
invoke-static {v0, v5, v4, v3}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;II)V
|
|
|
|
.line 2
|
|
aget-byte v0, p0, v2
|
|
|
|
aget-byte v1, p0, v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aget-byte v2, p0, v2
|
|
|
|
const/4 v3, 0x3
|
|
|
|
aget-byte p0, p0, v3
|
|
|
|
invoke-static {v0, v1, v2, p0}, Lcom/google/common/primitives/Ints;->fromBytes(BBBB)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static fromBytes(BBBB)I
|
|
.locals 0
|
|
|
|
shl-int/lit8 p0, p0, 0x18
|
|
|
|
and-int/lit16 p1, p1, 0xff
|
|
|
|
shl-int/lit8 p1, p1, 0x10
|
|
|
|
or-int/2addr p0, p1
|
|
|
|
and-int/lit16 p1, p2, 0xff
|
|
|
|
shl-int/lit8 p1, p1, 0x8
|
|
|
|
or-int/2addr p0, p1
|
|
|
|
and-int/lit16 p1, p3, 0xff
|
|
|
|
or-int/2addr p0, p1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static hashCode(I)I
|
|
.locals 0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static indexOf([II)I
|
|
.locals 2
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, p1, v1, v0}, Lcom/google/common/primitives/Ints;->indexOf([IIII)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private static indexOf([IIII)I
|
|
.locals 1
|
|
|
|
:goto_0
|
|
if-ge p2, p3, :cond_1
|
|
|
|
.line 2
|
|
aget v0, p0, p2
|
|
|
|
if-ne v0, p1, :cond_0
|
|
|
|
return p2
|
|
|
|
:cond_0
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static indexOf([I[I)I
|
|
.locals 5
|
|
|
|
const-string v0, "array"
|
|
|
|
.line 3
|
|
invoke-static {p0, v0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const-string v0, "target"
|
|
|
|
.line 4
|
|
invoke-static {p1, v0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 5
|
|
array-length v0, p1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
.line 6
|
|
:goto_0
|
|
array-length v2, p0
|
|
|
|
array-length v3, p1
|
|
|
|
sub-int/2addr v2, v3
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
if-ge v0, v2, :cond_3
|
|
|
|
move v2, v1
|
|
|
|
.line 7
|
|
:goto_1
|
|
array-length v3, p1
|
|
|
|
if-ge v2, v3, :cond_2
|
|
|
|
add-int v3, v0, v2
|
|
|
|
.line 8
|
|
aget v3, p0, v3
|
|
|
|
aget v4, p1, v2
|
|
|
|
if-eq v3, v4, :cond_1
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return v0
|
|
|
|
:cond_3
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static varargs join(Ljava/lang/String;[I)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 2
|
|
array-length v0, p1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string p0, ""
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
array-length v1, p1
|
|
|
|
mul-int/lit8 v1, v1, 0x5
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 4
|
|
aget v1, p1, v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 5
|
|
:goto_0
|
|
array-length v2, p1
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
.line 6
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
aget v2, p1, v1
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 7
|
|
:cond_1
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static lastIndexOf([II)I
|
|
.locals 2
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, p1, v1, v0}, Lcom/google/common/primitives/Ints;->lastIndexOf([IIII)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private static lastIndexOf([IIII)I
|
|
.locals 1
|
|
|
|
add-int/lit8 p3, p3, -0x1
|
|
|
|
:goto_0
|
|
if-lt p3, p2, :cond_1
|
|
|
|
.line 2
|
|
aget v0, p0, p3
|
|
|
|
if-ne v0, p1, :cond_0
|
|
|
|
return p3
|
|
|
|
:cond_0
|
|
add-int/lit8 p3, p3, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static lexicographicalComparator()Ljava/util/Comparator;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Comparator<",
|
|
"[I>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
sget-object v0, Lcom/google/common/primitives/Ints$LexicographicalComparator;->INSTANCE:Lcom/google/common/primitives/Ints$LexicographicalComparator;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static varargs max([I)I
|
|
.locals 3
|
|
.annotation build Lcom/google/common/annotations/GwtIncompatible;
|
|
value = "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class."
|
|
.end annotation
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
|
|
|
.line 2
|
|
aget v0, p0, v1
|
|
|
|
.line 3
|
|
:goto_1
|
|
array-length v1, p0
|
|
|
|
if-ge v2, v1, :cond_2
|
|
|
|
.line 4
|
|
aget v1, p0, v2
|
|
|
|
if-le v1, v0, :cond_1
|
|
|
|
.line 5
|
|
aget v0, p0, v2
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public static varargs min([I)I
|
|
.locals 3
|
|
.annotation build Lcom/google/common/annotations/GwtIncompatible;
|
|
value = "Available in GWT! Annotation is to avoid conflict with GWT specialization of base class."
|
|
.end annotation
|
|
|
|
.line 1
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
|
|
|
.line 2
|
|
aget v0, p0, v1
|
|
|
|
.line 3
|
|
:goto_1
|
|
array-length v1, p0
|
|
|
|
if-ge v2, v1, :cond_2
|
|
|
|
.line 4
|
|
aget v1, p0, v2
|
|
|
|
if-ge v1, v0, :cond_1
|
|
|
|
.line 5
|
|
aget v0, p0, v2
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public static reverse([I)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 2
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, v1, v0}, Lcom/google/common/primitives/Ints;->reverse([III)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static reverse([III)V
|
|
.locals 2
|
|
|
|
.line 3
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 4
|
|
array-length v0, p0
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
|
|
|
|
add-int/lit8 p2, p2, -0x1
|
|
|
|
:goto_0
|
|
if-ge p1, p2, :cond_0
|
|
|
|
.line 5
|
|
aget v0, p0, p1
|
|
|
|
.line 6
|
|
aget v1, p0, p2
|
|
|
|
aput v1, p0, p1
|
|
|
|
.line 7
|
|
aput v0, p0, p2
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
add-int/lit8 p2, p2, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public static saturatedCast(J)I
|
|
.locals 2
|
|
|
|
const-wide/32 v0, 0x7fffffff
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const p0, 0x7fffffff
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const-wide/32 v0, -0x80000000
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
const/high16 p0, -0x80000000
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
long-to-int p0, p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static sortDescending([I)V
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 2
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {p0, v1, v0}, Lcom/google/common/primitives/Ints;->sortDescending([III)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static sortDescending([III)V
|
|
.locals 1
|
|
|
|
.line 3
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 4
|
|
array-length v0, p0
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
|
|
|
|
.line 5
|
|
invoke-static {p0, p1, p2}, Ljava/util/Arrays;->sort([III)V
|
|
|
|
.line 6
|
|
invoke-static {p0, p1, p2}, Lcom/google/common/primitives/Ints;->reverse([III)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static stringConverter()Lcom/google/common/base/Converter;
|
|
.locals 1
|
|
.annotation build Lcom/google/common/annotations/Beta;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/base/Converter<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
sget-object v0, Lcom/google/common/primitives/Ints$IntConverter;->INSTANCE:Lcom/google/common/primitives/Ints$IntConverter;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static toArray(Ljava/util/Collection;)[I
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"+",
|
|
"Ljava/lang/Number;",
|
|
">;)[I"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
instance-of v0, p0, Lcom/google/common/primitives/Ints$IntArrayAsList;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2
|
|
check-cast p0, Lcom/google/common/primitives/Ints$IntArrayAsList;
|
|
|
|
invoke-virtual {p0}, Lcom/google/common/primitives/Ints$IntArrayAsList;->toIntArray()[I
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-interface {p0}, Ljava/util/Collection;->toArray()[Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
.line 4
|
|
array-length v0, p0
|
|
|
|
.line 5
|
|
new-array v1, v0, [I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_1
|
|
|
|
.line 6
|
|
aget-object v3, p0, v2
|
|
|
|
invoke-static {v3}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
aput v3, v1, v2
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public static toByteArray(I)[B
|
|
.locals 3
|
|
|
|
const/4 v0, 0x4
|
|
|
|
new-array v0, v0, [B
|
|
|
|
shr-int/lit8 v1, p0, 0x18
|
|
|
|
int-to-byte v1, v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-byte v1, v0, v2
|
|
|
|
shr-int/lit8 v1, p0, 0x10
|
|
|
|
int-to-byte v1, v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-byte v1, v0, v2
|
|
|
|
shr-int/lit8 v1, p0, 0x8
|
|
|
|
int-to-byte v1, v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-byte v1, v0, v2
|
|
|
|
int-to-byte p0, p0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
aput-byte p0, v0, v1
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static tryParse(Ljava/lang/String;)Ljava/lang/Integer;
|
|
.locals 1
|
|
.annotation build Lcom/google/common/annotations/Beta;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
const/16 v0, 0xa
|
|
|
|
.line 1
|
|
invoke-static {p0, v0}, Lcom/google/common/primitives/Ints;->tryParse(Ljava/lang/String;I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static tryParse(Ljava/lang/String;I)Ljava/lang/Integer;
|
|
.locals 4
|
|
.annotation build Lcom/google/common/annotations/Beta;
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 2
|
|
invoke-static {p0, p1}, Lcom/google/common/primitives/Longs;->tryParse(Ljava/lang/String;I)Ljava/lang/Long;
|
|
|
|
move-result-object p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 3
|
|
invoke-virtual {p0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Long;->intValue()I
|
|
|
|
move-result p1
|
|
|
|
int-to-long v2, p1
|
|
|
|
cmp-long p1, v0, v2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {p0}, Ljava/lang/Long;->intValue()I
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|