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

635 lines
17 KiB

.class final Lcom/google/common/collect/SparseImmutableTable;
.super Lcom/google/common/collect/RegularImmutableTable;
.source "SparseImmutableTable.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">",
"Lcom/google/common/collect/RegularImmutableTable",
"<TR;TC;TV;>;"
}
.end annotation
.annotation build Ljavax/annotation/concurrent/Immutable;
.end annotation
# instance fields
.field private final columnMap:Lcom/google/common/collect/ImmutableMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/collect/ImmutableMap",
"<TC;",
"Ljava/util/Map",
"<TR;TV;>;>;"
}
.end annotation
.end field
.field private final iterationOrderColumn:[I
.field private final iterationOrderRow:[I
.field private final rowMap:Lcom/google/common/collect/ImmutableMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/common/collect/ImmutableMap",
"<TR;",
"Ljava/util/Map",
"<TC;TV;>;>;"
}
.end annotation
.end field
# direct methods
.method constructor <init>(Lcom/google/common/collect/ImmutableList;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)V
.locals 11
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/common/collect/ImmutableList",
"<",
"Lcom/google/common/collect/Table$Cell",
"<TR;TC;TV;>;>;",
"Lcom/google/common/collect/ImmutableSet",
"<TR;>;",
"Lcom/google/common/collect/ImmutableSet",
"<TC;>;)V"
}
.end annotation
.prologue
.line 38
invoke-direct {p0}, Lcom/google/common/collect/RegularImmutableTable;-><init>()V
.line 39
invoke-static {}, Lcom/google/common/collect/Maps;->newHashMap()Ljava/util/HashMap;
move-result-object v2
.line 40
invoke-static {}, Lcom/google/common/collect/Maps;->newLinkedHashMap()Ljava/util/LinkedHashMap;
move-result-object v3
.line 41
invoke-virtual {p2}, Lcom/google/common/collect/ImmutableSet;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
.line 42
invoke-interface {v3}, Ljava/util/Map;->size()I
move-result v4
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
invoke-interface {v2, v1, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 43
new-instance v4, Ljava/util/LinkedHashMap;
invoke-direct {v4}, Ljava/util/LinkedHashMap;-><init>()V
invoke-interface {v3, v1, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
.line 45
:cond_0
invoke-static {}, Lcom/google/common/collect/Maps;->newLinkedHashMap()Ljava/util/LinkedHashMap;
move-result-object v4
.line 46
invoke-virtual {p3}, Lcom/google/common/collect/ImmutableSet;->iterator()Ljava/util/Iterator;
move-result-object v0
:goto_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
.line 47
new-instance v5, Ljava/util/LinkedHashMap;
invoke-direct {v5}, Ljava/util/LinkedHashMap;-><init>()V
invoke-interface {v4, v1, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_1
.line 49
:cond_1
invoke-virtual {p1}, Lcom/google/common/collect/ImmutableList;->size()I
move-result v0
new-array v5, v0, [I
.line 50
invoke-virtual {p1}, Lcom/google/common/collect/ImmutableList;->size()I
move-result v0
new-array v6, v0, [I
.line 51
const/4 v0, 0x0
move v1, v0
:goto_2
invoke-virtual {p1}, Lcom/google/common/collect/ImmutableList;->size()I
move-result v0
if-ge v1, v0, :cond_3
.line 52
invoke-virtual {p1, v1}, Lcom/google/common/collect/ImmutableList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/collect/Table$Cell;
.line 53
invoke-interface {v0}, Lcom/google/common/collect/Table$Cell;->getRowKey()Ljava/lang/Object;
move-result-object v7
.line 54
invoke-interface {v0}, Lcom/google/common/collect/Table$Cell;->getColumnKey()Ljava/lang/Object;
move-result-object v8
.line 55
invoke-interface {v0}, Lcom/google/common/collect/Table$Cell;->getValue()Ljava/lang/Object;
move-result-object v9
.line 57
invoke-interface {v2, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
aput v0, v5, v1
.line 58
invoke-interface {v3, v7}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map;
.line 59
invoke-interface {v0}, Ljava/util/Map;->size()I
move-result v10
aput v10, v6, v1
.line 60
invoke-interface {v0, v8, v9}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
.line 61
if-eqz v0, :cond_2
.line 62
new-instance v1, Ljava/lang/IllegalArgumentException;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Duplicate value for row="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, ", column="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, ": "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, ", "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v1
.line 65
:cond_2
invoke-interface {v4, v8}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map;
invoke-interface {v0, v7, v9}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 51
add-int/lit8 v0, v1, 0x1
move v1, v0
goto :goto_2
.line 67
:cond_3
iput-object v5, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderRow:[I
.line 68
iput-object v6, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderColumn:[I
.line 69
invoke-static {}, Lcom/google/common/collect/ImmutableMap;->builder()Lcom/google/common/collect/ImmutableMap$Builder;
move-result-object v1
.line 70
invoke-interface {v3}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_3
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_4
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map$Entry;
.line 71
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v3
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map;
invoke-static {v0}, Lcom/google/common/collect/ImmutableMap;->copyOf(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap;
move-result-object v0
invoke-virtual {v1, v3, v0}, Lcom/google/common/collect/ImmutableMap$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder;
goto :goto_3
.line 73
:cond_4
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap$Builder;->build()Lcom/google/common/collect/ImmutableMap;
move-result-object v0
iput-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->rowMap:Lcom/google/common/collect/ImmutableMap;
.line 75
invoke-static {}, Lcom/google/common/collect/ImmutableMap;->builder()Lcom/google/common/collect/ImmutableMap$Builder;
move-result-object v1
.line 76
invoke-interface {v4}, Ljava/util/Map;->entrySet()Ljava/util/Set;
move-result-object v0
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_4
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_5
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map$Entry;
.line 77
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v3
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map;
invoke-static {v0}, Lcom/google/common/collect/ImmutableMap;->copyOf(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap;
move-result-object v0
invoke-virtual {v1, v3, v0}, Lcom/google/common/collect/ImmutableMap$Builder;->put(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder;
goto :goto_4
.line 79
:cond_5
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap$Builder;->build()Lcom/google/common/collect/ImmutableMap;
move-result-object v0
iput-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->columnMap:Lcom/google/common/collect/ImmutableMap;
.line 80
return-void
.end method
# virtual methods
.method public columnMap()Lcom/google/common/collect/ImmutableMap;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/collect/ImmutableMap",
"<TC;",
"Ljava/util/Map",
"<TR;TV;>;>;"
}
.end annotation
.prologue
.line 83
iget-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->columnMap:Lcom/google/common/collect/ImmutableMap;
return-object v0
.end method
.method public bridge synthetic columnMap()Ljava/util/Map;
.locals 1
.prologue
.line 27
invoke-virtual {p0}, Lcom/google/common/collect/SparseImmutableTable;->columnMap()Lcom/google/common/collect/ImmutableMap;
move-result-object v0
return-object v0
.end method
.method getCell(I)Lcom/google/common/collect/Table$Cell;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/google/common/collect/Table$Cell",
"<TR;TC;TV;>;"
}
.end annotation
.prologue
.line 97
iget-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderRow:[I
aget v0, v0, p1
.line 98
iget-object v1, p0, Lcom/google/common/collect/SparseImmutableTable;->rowMap:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap;->entrySet()Lcom/google/common/collect/ImmutableSet;
move-result-object v1
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableSet;->asList()Lcom/google/common/collect/ImmutableList;
move-result-object v1
invoke-virtual {v1, v0}, Lcom/google/common/collect/ImmutableList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/Map$Entry;
.line 99
invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/common/collect/ImmutableMap;
.line 100
iget-object v2, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderColumn:[I
aget v2, v2, p1
.line 101
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap;->entrySet()Lcom/google/common/collect/ImmutableSet;
move-result-object v1
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableSet;->asList()Lcom/google/common/collect/ImmutableList;
move-result-object v1
invoke-virtual {v1, v2}, Lcom/google/common/collect/ImmutableList;->get(I)Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/util/Map$Entry;
.line 102
invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v0
invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v2
invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v1
invoke-static {v0, v2, v1}, Lcom/google/common/collect/SparseImmutableTable;->cellOf(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/Table$Cell;
move-result-object v0
return-object v0
.end method
.method getValue(I)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)TV;"
}
.end annotation
.prologue
.line 107
iget-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderRow:[I
aget v0, v0, p1
.line 108
iget-object v1, p0, Lcom/google/common/collect/SparseImmutableTable;->rowMap:Lcom/google/common/collect/ImmutableMap;
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableMap;->values()Lcom/google/common/collect/ImmutableCollection;
move-result-object v1
invoke-virtual {v1}, Lcom/google/common/collect/ImmutableCollection;->asList()Lcom/google/common/collect/ImmutableList;
move-result-object v1
invoke-virtual {v1, v0}, Lcom/google/common/collect/ImmutableList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/common/collect/ImmutableMap;
.line 109
iget-object v1, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderColumn:[I
aget v1, v1, p1
.line 110
invoke-virtual {v0}, Lcom/google/common/collect/ImmutableMap;->values()Lcom/google/common/collect/ImmutableCollection;
move-result-object v0
invoke-virtual {v0}, Lcom/google/common/collect/ImmutableCollection;->asList()Lcom/google/common/collect/ImmutableList;
move-result-object v0
invoke-virtual {v0, v1}, Lcom/google/common/collect/ImmutableList;->get(I)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public rowMap()Lcom/google/common/collect/ImmutableMap;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/collect/ImmutableMap",
"<TR;",
"Ljava/util/Map",
"<TC;TV;>;>;"
}
.end annotation
.prologue
.line 87
iget-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->rowMap:Lcom/google/common/collect/ImmutableMap;
return-object v0
.end method
.method public bridge synthetic rowMap()Ljava/util/Map;
.locals 1
.prologue
.line 27
invoke-virtual {p0}, Lcom/google/common/collect/SparseImmutableTable;->rowMap()Lcom/google/common/collect/ImmutableMap;
move-result-object v0
return-object v0
.end method
.method public size()I
.locals 1
.prologue
.line 92
iget-object v0, p0, Lcom/google/common/collect/SparseImmutableTable;->iterationOrderRow:[I
array-length v0, v0
return v0
.end method