You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
542 lines
13 KiB
542 lines
13 KiB
.class public final Lcom/google/common/primitives/UnsignedInteger; |
|
.super Ljava/lang/Number; |
|
.source "UnsignedInteger.java" |
|
|
|
# interfaces |
|
.implements Ljava/lang/Comparable; |
|
|
|
|
|
# annotations |
|
.annotation build Lcom/google/common/annotations/GwtCompatible; |
|
emulated = true |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Ljava/lang/Number;", |
|
"Ljava/lang/Comparable", |
|
"<", |
|
"Lcom/google/common/primitives/UnsignedInteger;", |
|
">;" |
|
} |
|
.end annotation |
|
|
|
|
|
# static fields |
|
.field public static final MAX_VALUE:Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
.field public static final ONE:Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
.field public static final ZERO:Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
|
|
# instance fields |
|
.field private final value:I |
|
|
|
|
|
# direct methods |
|
.method static constructor <clinit>()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 46 |
|
const/4 v0, 0x0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/google/common/primitives/UnsignedInteger;->ZERO:Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
.line 47 |
|
const/4 v0, 0x1 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/google/common/primitives/UnsignedInteger;->ONE:Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
.line 48 |
|
const/4 v0, -0x1 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/google/common/primitives/UnsignedInteger;->MAX_VALUE:Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
return-void |
|
.end method |
|
|
|
.method private constructor <init>(I)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 52 |
|
invoke-direct {p0}, Ljava/lang/Number;-><init>()V |
|
|
|
.line 54 |
|
and-int/lit8 v0, p1, -0x1 |
|
|
|
iput v0, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
.line 55 |
|
return-void |
|
.end method |
|
|
|
.method public static fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 70 |
|
new-instance v0, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
invoke-direct {v0, p0}, Lcom/google/common/primitives/UnsignedInteger;-><init>(I)V |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static valueOf(J)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 6 |
|
|
|
.prologue |
|
const/4 v1, 0x1 |
|
|
|
const/4 v2, 0x0 |
|
|
|
.line 78 |
|
const-wide v4, 0xffffffffL |
|
|
|
and-long/2addr v4, p0 |
|
|
|
cmp-long v0, v4, p0 |
|
|
|
if-nez v0, :cond_0 |
|
|
|
move v0, v1 |
|
|
|
:goto_0 |
|
const-string v3, "value (%s) is outside the range for an unsigned integer value" |
|
|
|
new-array v1, v1, [Ljava/lang/Object; |
|
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; |
|
|
|
move-result-object v4 |
|
|
|
aput-object v4, v1, v2 |
|
|
|
invoke-static {v0, v3, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V |
|
|
|
.line 80 |
|
long-to-int v0, p0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
|
|
:cond_0 |
|
move v0, v2 |
|
|
|
.line 78 |
|
goto :goto_0 |
|
.end method |
|
|
|
.method public static valueOf(Ljava/lang/String;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 104 |
|
const/16 v0, 0xa |
|
|
|
invoke-static {p0, v0}, Lcom/google/common/primitives/UnsignedInteger;->valueOf(Ljava/lang/String;I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static valueOf(Ljava/lang/String;I)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 115 |
|
invoke-static {p0, p1}, Lcom/google/common/primitives/UnsignedInts;->parseUnsignedInt(Ljava/lang/String;I)I |
|
|
|
move-result v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static valueOf(Ljava/math/BigInteger;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 4 |
|
|
|
.prologue |
|
const/4 v1, 0x1 |
|
|
|
const/4 v2, 0x0 |
|
|
|
.line 90 |
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 91 |
|
invoke-virtual {p0}, Ljava/math/BigInteger;->signum()I |
|
|
|
move-result v0 |
|
|
|
if-ltz v0, :cond_0 |
|
|
|
invoke-virtual {p0}, Ljava/math/BigInteger;->bitLength()I |
|
|
|
move-result v0 |
|
|
|
const/16 v3, 0x20 |
|
|
|
if-gt v0, v3, :cond_0 |
|
|
|
move v0, v1 |
|
|
|
:goto_0 |
|
const-string v3, "value (%s) is outside the range for an unsigned integer value" |
|
|
|
new-array v1, v1, [Ljava/lang/Object; |
|
|
|
aput-object p0, v1, v2 |
|
|
|
invoke-static {v0, v3, v1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V |
|
|
|
.line 93 |
|
invoke-virtual {p0}, Ljava/math/BigInteger;->intValue()I |
|
|
|
move-result v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
|
|
:cond_0 |
|
move v0, v2 |
|
|
|
.line 91 |
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public bigIntegerValue()Ljava/math/BigInteger; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 217 |
|
invoke-virtual {p0}, Lcom/google/common/primitives/UnsignedInteger;->longValue()J |
|
|
|
move-result-wide v0 |
|
|
|
invoke-static {v0, v1}, Ljava/math/BigInteger;->valueOf(J)Ljava/math/BigInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public compareTo(Lcom/google/common/primitives/UnsignedInteger;)I |
|
.locals 2 |
|
|
|
.prologue |
|
.line 227 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
.line 228 |
|
iget v0, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
iget v1, p1, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {v0, v1}, Lcom/google/common/primitives/UnsignedInts;->compare(II)I |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public bridge synthetic compareTo(Ljava/lang/Object;)I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 44 |
|
check-cast p1, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
invoke-virtual {p0, p1}, Lcom/google/common/primitives/UnsignedInteger;->compareTo(Lcom/google/common/primitives/UnsignedInteger;)I |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public dividedBy(Lcom/google/common/primitives/UnsignedInteger;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 2 |
|
.annotation runtime Ljavax/annotation/CheckReturnValue; |
|
.end annotation |
|
|
|
.prologue |
|
.line 161 |
|
iget v1, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
iget v0, v0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {v1, v0}, Lcom/google/common/primitives/UnsignedInts;->divide(II)I |
|
|
|
move-result v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public doubleValue()D |
|
.locals 2 |
|
|
|
.prologue |
|
.line 210 |
|
invoke-virtual {p0}, Lcom/google/common/primitives/UnsignedInteger;->longValue()J |
|
|
|
move-result-wide v0 |
|
|
|
long-to-double v0, v0 |
|
|
|
return-wide v0 |
|
.end method |
|
|
|
.method public equals(Ljava/lang/Object;)Z |
|
.locals 3 |
|
.param p1 # Ljava/lang/Object; |
|
.annotation runtime Ljavax/annotation/Nullable; |
|
.end annotation |
|
.end param |
|
|
|
.prologue |
|
const/4 v0, 0x0 |
|
|
|
.line 238 |
|
instance-of v1, p1, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 239 |
|
check-cast p1, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
.line 240 |
|
iget v1, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
iget v2, p1, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
if-ne v1, v2, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
.line 242 |
|
:cond_0 |
|
return v0 |
|
.end method |
|
|
|
.method public floatValue()F |
|
.locals 2 |
|
|
|
.prologue |
|
.line 201 |
|
invoke-virtual {p0}, Lcom/google/common/primitives/UnsignedInteger;->longValue()J |
|
|
|
move-result-wide v0 |
|
|
|
long-to-float v0, v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public hashCode()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 233 |
|
iget v0, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public intValue()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 184 |
|
iget v0, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public longValue()J |
|
.locals 2 |
|
|
|
.prologue |
|
.line 192 |
|
iget v0, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInts;->toLong(I)J |
|
|
|
move-result-wide v0 |
|
|
|
return-wide v0 |
|
.end method |
|
|
|
.method public minus(Lcom/google/common/primitives/UnsignedInteger;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 2 |
|
.annotation runtime Ljavax/annotation/CheckReturnValue; |
|
.end annotation |
|
|
|
.prologue |
|
.line 137 |
|
iget v1, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
iget v0, v0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
sub-int v0, v1, v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public mod(Lcom/google/common/primitives/UnsignedInteger;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 2 |
|
.annotation runtime Ljavax/annotation/CheckReturnValue; |
|
.end annotation |
|
|
|
.prologue |
|
.line 172 |
|
iget v1, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
iget v0, v0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {v1, v0}, Lcom/google/common/primitives/UnsignedInts;->remainder(II)I |
|
|
|
move-result v0 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public plus(Lcom/google/common/primitives/UnsignedInteger;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 2 |
|
.annotation runtime Ljavax/annotation/CheckReturnValue; |
|
.end annotation |
|
|
|
.prologue |
|
.line 126 |
|
iget v1, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
iget v0, v0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
add-int/2addr v0, v1 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public times(Lcom/google/common/primitives/UnsignedInteger;)Lcom/google/common/primitives/UnsignedInteger; |
|
.locals 2 |
|
.annotation build Lcom/google/common/annotations/GwtIncompatible; |
|
value = "Does not truncate correctly" |
|
.end annotation |
|
|
|
.annotation runtime Ljavax/annotation/CheckReturnValue; |
|
.end annotation |
|
|
|
.prologue |
|
.line 150 |
|
iget v1, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
iget v0, v0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
mul-int/2addr v0, v1 |
|
|
|
invoke-static {v0}, Lcom/google/common/primitives/UnsignedInteger;->fromIntBits(I)Lcom/google/common/primitives/UnsignedInteger; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public toString()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 250 |
|
const/16 v0, 0xa |
|
|
|
invoke-virtual {p0, v0}, Lcom/google/common/primitives/UnsignedInteger;->toString(I)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public toString(I)Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 259 |
|
iget v0, p0, Lcom/google/common/primitives/UnsignedInteger;->value:I |
|
|
|
invoke-static {v0, p1}, Lcom/google/common/primitives/UnsignedInts;->toString(II)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method
|
|
|