今奥全景相机
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.

230 lines
6.5 KiB

.class abstract Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
.super Lcom/google/common/collect/ImmutableCollection$Builder;
.source "ImmutableCollection.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/common/collect/ImmutableCollection;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x408
name = "ArrayBasedBuilder"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">",
"Lcom/google/common/collect/ImmutableCollection$Builder",
"<TE;>;"
}
.end annotation
# instance fields
.field contents:[Ljava/lang/Object;
.field size:I
# direct methods
.method constructor <init>(I)V
.locals 1
.prologue
.line 320
invoke-direct {p0}, Lcom/google/common/collect/ImmutableCollection$Builder;-><init>()V
.line 321
const-string v0, "initialCapacity"
invoke-static {p1, v0}, Lcom/google/common/collect/CollectPreconditions;->checkNonnegative(ILjava/lang/String;)I
.line 322
new-array v0, p1, [Ljava/lang/Object;
iput-object v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
.line 323
const/4 v0, 0x0
iput v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
.line 324
return-void
.end method
.method private ensureCapacity(I)V
.locals 2
.prologue
.line 331
iget-object v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
array-length v0, v0
if-ge v0, p1, :cond_0
.line 332
iget-object v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
iget-object v1, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
array-length v1, v1
invoke-static {v1, p1}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->expandedCapacity(II)I
move-result v1
invoke-static {v0, v1}, Lcom/google/common/collect/ObjectArrays;->arraysCopyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
move-result-object v0
iput-object v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
.line 335
:cond_0
return-void
.end method
# virtual methods
.method public add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TE;)",
"Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder",
"<TE;>;"
}
.end annotation
.prologue
.line 339
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
.line 340
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
add-int/lit8 v0, v0, 0x1
invoke-direct {p0, v0}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->ensureCapacity(I)V
.line 341
iget-object v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
iget v1, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
add-int/lit8 v2, v1, 0x1
iput v2, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
aput-object p1, v0, v1
.line 342
return-object p0
.end method
.method public bridge synthetic add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$Builder;
.locals 1
.prologue
.line 316
invoke-virtual {p0, p1}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;
move-result-object v0
return-object v0
.end method
.method public varargs add([Ljava/lang/Object;)Lcom/google/common/collect/ImmutableCollection$Builder;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"([TE;)",
"Lcom/google/common/collect/ImmutableCollection$Builder",
"<TE;>;"
}
.end annotation
.prologue
.line 347
invoke-static {p1}, Lcom/google/common/collect/ObjectArrays;->checkElementsNotNull([Ljava/lang/Object;)[Ljava/lang/Object;
.line 348
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
array-length v1, p1
add-int/2addr v0, v1
invoke-direct {p0, v0}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->ensureCapacity(I)V
.line 349
const/4 v0, 0x0
iget-object v1, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->contents:[Ljava/lang/Object;
iget v2, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
array-length v3, p1
invoke-static {p1, v0, v1, v2, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 350
iget v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
array-length v1, p1
add-int/2addr v0, v1
iput v0, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
.line 351
return-object p0
.end method
.method public addAll(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableCollection$Builder;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Iterable",
"<+TE;>;)",
"Lcom/google/common/collect/ImmutableCollection$Builder",
"<TE;>;"
}
.end annotation
.prologue
.line 356
instance-of v0, p1, Ljava/util/Collection;
if-eqz v0, :cond_0
move-object v0, p1
.line 357
check-cast v0, Ljava/util/Collection;
.line 358
iget v1, p0, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->size:I
invoke-interface {v0}, Ljava/util/Collection;->size()I
move-result v0
add-int/2addr v0, v1
invoke-direct {p0, v0}, Lcom/google/common/collect/ImmutableCollection$ArrayBasedBuilder;->ensureCapacity(I)V
.line 360
:cond_0
invoke-super {p0, p1}, Lcom/google/common/collect/ImmutableCollection$Builder;->addAll(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableCollection$Builder;
.line 361
return-object p0
.end method