.class public final Lcom/google/common/base/Preconditions; .super Ljava/lang/Object; .source "Preconditions.java" # annotations .annotation build Lcom/google/common/annotations/GwtCompatible; .end annotation # direct methods .method private constructor ()V .locals 0 .prologue .line 101 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method private static badElementIndex(IILjava/lang/String;)Ljava/lang/String; .locals 5 .prologue const/4 v4, 0x2 const/4 v3, 0x1 const/4 v2, 0x0 .line 319 if-gez p0, :cond_0 .line 320 const-string v0, "%s (%s) must not be negative" new-array v1, v4, [Ljava/lang/Object; aput-object p2, v1, v2 invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v2 aput-object v2, v1, v3 invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 .line 324 :goto_0 return-object v0 .line 321 :cond_0 if-gez p1, :cond_1 .line 322 new-instance v0, Ljava/lang/IllegalArgumentException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "negative size: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 324 :cond_1 const-string v0, "%s (%s) must be less than size (%s)" const/4 v1, 0x3 new-array v1, v1, [Ljava/lang/Object; aput-object p2, v1, v2 invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v2 aput-object v2, v1, v3 invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v2 aput-object v2, v1, v4 invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 goto :goto_0 .end method .method private static badPositionIndex(IILjava/lang/String;)Ljava/lang/String; .locals 5 .prologue const/4 v4, 0x2 const/4 v3, 0x1 const/4 v2, 0x0 .line 362 if-gez p0, :cond_0 .line 363 const-string v0, "%s (%s) must not be negative" new-array v1, v4, [Ljava/lang/Object; aput-object p2, v1, v2 invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v2 aput-object v2, v1, v3 invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 .line 367 :goto_0 return-object v0 .line 364 :cond_0 if-gez p1, :cond_1 .line 365 new-instance v0, Ljava/lang/IllegalArgumentException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "negative size: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 367 :cond_1 const-string v0, "%s (%s) must not be greater than size (%s)" const/4 v1, 0x3 new-array v1, v1, [Ljava/lang/Object; aput-object p2, v1, v2 invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v2 aput-object v2, v1, v3 invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v2 aput-object v2, v1, v4 invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 goto :goto_0 .end method .method private static badPositionIndexes(III)Ljava/lang/String; .locals 4 .prologue .line 391 if-ltz p0, :cond_0 if-le p0, p2, :cond_1 .line 392 :cond_0 const-string v0, "start index" invoke-static {p0, p2, v0}, Lcom/google/common/base/Preconditions;->badPositionIndex(IILjava/lang/String;)Ljava/lang/String; move-result-object v0 .line 398 :goto_0 return-object v0 .line 394 :cond_1 if-ltz p1, :cond_2 if-le p1, p2, :cond_3 .line 395 :cond_2 const-string v0, "end index" invoke-static {p1, p2, v0}, Lcom/google/common/base/Preconditions;->badPositionIndex(IILjava/lang/String;)Ljava/lang/String; move-result-object v0 goto :goto_0 .line 398 :cond_3 const-string v0, "end index (%s) must not be less than start index (%s)" const/4 v1, 0x2 new-array v1, v1, [Ljava/lang/Object; const/4 v2, 0x0 invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v3 aput-object v3, v1, v2 const/4 v2, 0x1 invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; move-result-object v3 aput-object v3, v1, v2 invoke-static {v0, v1}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 goto :goto_0 .end method .method public static checkArgument(Z)V .locals 1 .prologue .line 110 if-nez p0, :cond_0 .line 111 new-instance v0, Ljava/lang/IllegalArgumentException; invoke-direct {v0}, Ljava/lang/IllegalArgumentException;->()V throw v0 .line 113 :cond_0 return-void .end method .method public static checkArgument(ZLjava/lang/Object;)V .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 124 if-nez p0, :cond_0 .line 125 new-instance v0, Ljava/lang/IllegalArgumentException; invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 127 :cond_0 return-void .end method .method public static varargs checkArgument(ZLjava/lang/String;[Ljava/lang/Object;)V .locals 2 .param p1 # Ljava/lang/String; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .param p2 # [Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 147 if-nez p0, :cond_0 .line 148 new-instance v0, Ljava/lang/IllegalArgumentException; invoke-static {p1, p2}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 150 :cond_0 return-void .end method .method public static checkElementIndex(II)I .locals 1 .prologue .line 295 const-string v0, "index" invoke-static {p0, p1, v0}, Lcom/google/common/base/Preconditions;->checkElementIndex(IILjava/lang/String;)I move-result v0 return v0 .end method .method public static checkElementIndex(IILjava/lang/String;)I .locals 2 .param p2 # Ljava/lang/String; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 312 if-ltz p0, :cond_0 if-lt p0, p1, :cond_1 .line 313 :cond_0 new-instance v0, Ljava/lang/IndexOutOfBoundsException; invoke-static {p0, p1, p2}, Lcom/google/common/base/Preconditions;->badElementIndex(IILjava/lang/String;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IndexOutOfBoundsException;->(Ljava/lang/String;)V throw v0 .line 315 :cond_1 return p0 .end method .method public static checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(TT;)TT;" } .end annotation .prologue .line 212 if-nez p0, :cond_0 .line 213 new-instance v0, Ljava/lang/NullPointerException; invoke-direct {v0}, Ljava/lang/NullPointerException;->()V throw v0 .line 215 :cond_0 return-object p0 .end method .method public static checkNotNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(TT;", "Ljava/lang/Object;", ")TT;" } .end annotation .prologue .line 228 if-nez p0, :cond_0 .line 229 new-instance v0, Ljava/lang/NullPointerException; invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 .line 231 :cond_0 return-object p0 .end method .method public static varargs checkNotNull(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; .locals 2 .param p1 # Ljava/lang/String; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .param p2 # [Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/Signature; value = { "(TT;", "Ljava/lang/String;", "[", "Ljava/lang/Object;", ")TT;" } .end annotation .prologue .line 251 if-nez p0, :cond_0 .line 253 new-instance v0, Ljava/lang/NullPointerException; invoke-static {p1, p2}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 .line 255 :cond_0 return-object p0 .end method .method public static checkPositionIndex(II)I .locals 1 .prologue .line 339 const-string v0, "index" invoke-static {p0, p1, v0}, Lcom/google/common/base/Preconditions;->checkPositionIndex(IILjava/lang/String;)I move-result v0 return v0 .end method .method public static checkPositionIndex(IILjava/lang/String;)I .locals 2 .param p2 # Ljava/lang/String; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 355 if-ltz p0, :cond_0 if-le p0, p1, :cond_1 .line 356 :cond_0 new-instance v0, Ljava/lang/IndexOutOfBoundsException; invoke-static {p0, p1, p2}, Lcom/google/common/base/Preconditions;->badPositionIndex(IILjava/lang/String;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IndexOutOfBoundsException;->(Ljava/lang/String;)V throw v0 .line 358 :cond_1 return p0 .end method .method public static checkPositionIndexes(III)V .locals 2 .prologue .line 385 if-ltz p0, :cond_0 if-lt p1, p0, :cond_0 if-le p1, p2, :cond_1 .line 386 :cond_0 new-instance v0, Ljava/lang/IndexOutOfBoundsException; invoke-static {p0, p1, p2}, Lcom/google/common/base/Preconditions;->badPositionIndexes(III)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IndexOutOfBoundsException;->(Ljava/lang/String;)V throw v0 .line 388 :cond_1 return-void .end method .method public static checkState(Z)V .locals 1 .prologue .line 160 if-nez p0, :cond_0 .line 161 new-instance v0, Ljava/lang/IllegalStateException; invoke-direct {v0}, Ljava/lang/IllegalStateException;->()V throw v0 .line 163 :cond_0 return-void .end method .method public static checkState(ZLjava/lang/Object;)V .locals 2 .param p1 # Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 175 if-nez p0, :cond_0 .line 176 new-instance v0, Ljava/lang/IllegalStateException; invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v0 .line 178 :cond_0 return-void .end method .method public static varargs checkState(ZLjava/lang/String;[Ljava/lang/Object;)V .locals 2 .param p1 # Ljava/lang/String; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .param p2 # [Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue .line 199 if-nez p0, :cond_0 .line 200 new-instance v0, Ljava/lang/IllegalStateException; invoke-static {p1, p2}, Lcom/google/common/base/Preconditions;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v0 .line 202 :cond_0 return-void .end method .method static varargs format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; .locals 7 .param p1 # [Ljava/lang/Object; .annotation runtime Ljavax/annotation/Nullable; .end annotation .end param .prologue const/4 v0, 0x0 .line 413 invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String; move-result-object v2 .line 416 new-instance v3, Ljava/lang/StringBuilder; invoke-virtual {v2}, Ljava/lang/String;->length()I move-result v1 array-length v4, p1 mul-int/lit8 v4, v4, 0x10 add-int/2addr v1, v4 invoke-direct {v3, v1}, Ljava/lang/StringBuilder;->(I)V move v1, v0 .line 419 :goto_0 array-length v4, p1 if-ge v0, v4, :cond_0 .line 420 const-string v4, "%s" invoke-virtual {v2, v4, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;I)I move-result v4 .line 421 const/4 v5, -0x1 if-ne v4, v5, :cond_1 .line 428 :cond_0 invoke-virtual {v2, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String; move-result-object v1 invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 431 array-length v1, p1 if-ge v0, v1, :cond_3 .line 432 const-string v1, " [" invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 433 add-int/lit8 v1, v0, 0x1 aget-object v0, p1, v0 invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move v0, v1 .line 434 :goto_1 array-length v1, p1 if-ge v0, v1, :cond_2 .line 435 const-string v1, ", " invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 436 add-int/lit8 v1, v0, 0x1 aget-object v0, p1, v0 invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move v0, v1 goto :goto_1 .line 424 :cond_1 invoke-virtual {v2, v1, v4}, Ljava/lang/String;->substring(II)Ljava/lang/String; move-result-object v1 invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 425 add-int/lit8 v1, v0, 0x1 aget-object v0, p1, v0 invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; .line 426 add-int/lit8 v0, v4, 0x2 move v6, v1 move v1, v0 move v0, v6 .line 427 goto :goto_0 .line 438 :cond_2 const/16 v0, 0x5d invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder; .line 441 :cond_3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 return-object v0 .end method