tmap/smali_classes3/com/google/common/collect/RegularImmutableTable.smali
2022-06-10 21:38:30 +09:00

478 lines
13 KiB
Smali

.class abstract Lcom/google/common/collect/RegularImmutableTable;
.super Lcom/google/common/collect/ImmutableTable;
.source "RegularImmutableTable.java"
# annotations
.annotation build Lcom/google/common/annotations/GwtCompatible;
.end annotation
.annotation runtime Lcom/google/common/collect/ElementTypesAreNonnullByDefault;
.end annotation
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/google/common/collect/RegularImmutableTable$Values;,
Lcom/google/common/collect/RegularImmutableTable$CellSet;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">",
"Lcom/google/common/collect/ImmutableTable<",
"TR;TC;TV;>;"
}
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Lcom/google/common/collect/ImmutableTable;-><init>()V
return-void
.end method
.method public static forCells(Ljava/lang/Iterable;)Lcom/google/common/collect/RegularImmutableTable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"Lcom/google/common/collect/Table$Cell<",
"TR;TC;TV;>;>;)",
"Lcom/google/common/collect/RegularImmutableTable<",
"TR;TC;TV;>;"
}
.end annotation
const/4 v0, 0x0
.line 5
invoke-static {p0, v0, v0}, Lcom/google/common/collect/RegularImmutableTable;->forCellsInternal(Ljava/lang/Iterable;Ljava/util/Comparator;Ljava/util/Comparator;)Lcom/google/common/collect/RegularImmutableTable;
move-result-object p0
return-object p0
.end method
.method public static forCells(Ljava/util/List;Ljava/util/Comparator;Ljava/util/Comparator;)Lcom/google/common/collect/RegularImmutableTable;
.locals 1
.param p1 # Ljava/util/Comparator;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.param p2 # Ljava/util/Comparator;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"Ljava/util/List<",
"Lcom/google/common/collect/Table$Cell<",
"TR;TC;TV;>;>;",
"Ljava/util/Comparator<",
"-TR;>;",
"Ljava/util/Comparator<",
"-TC;>;)",
"Lcom/google/common/collect/RegularImmutableTable<",
"TR;TC;TV;>;"
}
.end annotation
.line 1
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
if-nez p1, :cond_0
if-eqz p2, :cond_1
.line 2
:cond_0
new-instance v0, Lcom/google/common/collect/RegularImmutableTable$1;
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/RegularImmutableTable$1;-><init>(Ljava/util/Comparator;Ljava/util/Comparator;)V
.line 3
invoke-static {p0, v0}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
.line 4
:cond_1
invoke-static {p0, p1, p2}, Lcom/google/common/collect/RegularImmutableTable;->forCellsInternal(Ljava/lang/Iterable;Ljava/util/Comparator;Ljava/util/Comparator;)Lcom/google/common/collect/RegularImmutableTable;
move-result-object p0
return-object p0
.end method
.method private static forCellsInternal(Ljava/lang/Iterable;Ljava/util/Comparator;Ljava/util/Comparator;)Lcom/google/common/collect/RegularImmutableTable;
.locals 5
.param p1 # Ljava/util/Comparator;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.param p2 # Ljava/util/Comparator;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"Lcom/google/common/collect/Table$Cell<",
"TR;TC;TV;>;>;",
"Ljava/util/Comparator<",
"-TR;>;",
"Ljava/util/Comparator<",
"-TC;>;)",
"Lcom/google/common/collect/RegularImmutableTable<",
"TR;TC;TV;>;"
}
.end annotation
.line 1
new-instance v0, Ljava/util/LinkedHashSet;
invoke-direct {v0}, Ljava/util/LinkedHashSet;-><init>()V
.line 2
new-instance v1, Ljava/util/LinkedHashSet;
invoke-direct {v1}, Ljava/util/LinkedHashSet;-><init>()V
.line 3
invoke-static {p0}, Lcom/google/common/collect/ImmutableList;->copyOf(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableList;
move-result-object v2
.line 4
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_0
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/google/common/collect/Table$Cell;
.line 5
invoke-interface {v3}, Lcom/google/common/collect/Table$Cell;->getRowKey()Ljava/lang/Object;
move-result-object v4
invoke-interface {v0, v4}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
.line 6
invoke-interface {v3}, Lcom/google/common/collect/Table$Cell;->getColumnKey()Ljava/lang/Object;
move-result-object v3
invoke-interface {v1, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_0
:cond_0
if-nez p1, :cond_1
.line 7
invoke-static {v0}, Lcom/google/common/collect/ImmutableSet;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
move-result-object p0
goto :goto_1
.line 8
:cond_1
invoke-static {p1, v0}, Lcom/google/common/collect/ImmutableList;->sortedCopyOf(Ljava/util/Comparator;Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableList;
move-result-object p0
invoke-static {p0}, Lcom/google/common/collect/ImmutableSet;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
move-result-object p0
:goto_1
if-nez p2, :cond_2
.line 9
invoke-static {v1}, Lcom/google/common/collect/ImmutableSet;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
move-result-object p1
goto :goto_2
.line 10
:cond_2
invoke-static {p2, v1}, Lcom/google/common/collect/ImmutableList;->sortedCopyOf(Ljava/util/Comparator;Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableList;
move-result-object p1
invoke-static {p1}, Lcom/google/common/collect/ImmutableSet;->copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
move-result-object p1
.line 11
:goto_2
invoke-static {v2, p0, p1}, Lcom/google/common/collect/RegularImmutableTable;->forOrderedComponents(Lcom/google/common/collect/ImmutableList;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)Lcom/google/common/collect/RegularImmutableTable;
move-result-object p0
return-object p0
.end method
.method public static forOrderedComponents(Lcom/google/common/collect/ImmutableList;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)Lcom/google/common/collect/RegularImmutableTable;
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"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;>;)",
"Lcom/google/common/collect/RegularImmutableTable<",
"TR;TC;TV;>;"
}
.end annotation
.line 1
invoke-virtual {p0}, Ljava/util/AbstractCollection;->size()I
move-result v0
int-to-long v0, v0
invoke-virtual {p1}, Ljava/util/AbstractCollection;->size()I
move-result v2
int-to-long v2, v2
invoke-virtual {p2}, Ljava/util/AbstractCollection;->size()I
move-result v4
int-to-long v4, v4
mul-long/2addr v2, v4
const-wide/16 v4, 0x2
div-long/2addr v2, v4
cmp-long v0, v0, v2
if-lez v0, :cond_0
.line 2
new-instance v0, Lcom/google/common/collect/DenseImmutableTable;
invoke-direct {v0, p0, p1, p2}, Lcom/google/common/collect/DenseImmutableTable;-><init>(Lcom/google/common/collect/ImmutableList;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)V
goto :goto_0
.line 3
:cond_0
new-instance v0, Lcom/google/common/collect/SparseImmutableTable;
invoke-direct {v0, p0, p1, p2}, Lcom/google/common/collect/SparseImmutableTable;-><init>(Lcom/google/common/collect/ImmutableList;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;)V
:goto_0
return-object v0
.end method
# virtual methods
.method public final checkNoDuplicate(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
.locals 7
.param p3 # Ljava/lang/Object;
.annotation runtime Ljavax/annotation/CheckForNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(TR;TC;TV;TV;)V"
}
.end annotation
if-nez p3, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
move v1, v0
const-string v2, "Duplicate key: (row=%s, column=%s), values: [%s, %s]."
move-object v3, p1
move-object v4, p2
move-object v5, p4
move-object v6, p3
.line 1
invoke-static/range {v1 .. v6}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
return-void
.end method
.method public final createCellSet()Lcom/google/common/collect/ImmutableSet;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/collect/ImmutableSet<",
"Lcom/google/common/collect/Table$Cell<",
"TR;TC;TV;>;>;"
}
.end annotation
.line 2
invoke-virtual {p0}, Lcom/google/common/collect/ImmutableTable;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
invoke-static {}, Lcom/google/common/collect/ImmutableSet;->of()Lcom/google/common/collect/ImmutableSet;
move-result-object v0
goto :goto_0
:cond_0
new-instance v0, Lcom/google/common/collect/RegularImmutableTable$CellSet;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/google/common/collect/RegularImmutableTable$CellSet;-><init>(Lcom/google/common/collect/RegularImmutableTable;Lcom/google/common/collect/RegularImmutableTable$1;)V
:goto_0
return-object v0
.end method
.method public bridge synthetic createCellSet()Ljava/util/Set;
.locals 1
.line 1
invoke-virtual {p0}, Lcom/google/common/collect/RegularImmutableTable;->createCellSet()Lcom/google/common/collect/ImmutableSet;
move-result-object v0
return-object v0
.end method
.method public final createValues()Lcom/google/common/collect/ImmutableCollection;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lcom/google/common/collect/ImmutableCollection<",
"TV;>;"
}
.end annotation
.line 2
invoke-virtual {p0}, Lcom/google/common/collect/ImmutableTable;->isEmpty()Z
move-result v0
if-eqz v0, :cond_0
invoke-static {}, Lcom/google/common/collect/ImmutableList;->of()Lcom/google/common/collect/ImmutableList;
move-result-object v0
goto :goto_0
:cond_0
new-instance v0, Lcom/google/common/collect/RegularImmutableTable$Values;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lcom/google/common/collect/RegularImmutableTable$Values;-><init>(Lcom/google/common/collect/RegularImmutableTable;Lcom/google/common/collect/RegularImmutableTable$1;)V
:goto_0
return-object v0
.end method
.method public bridge synthetic createValues()Ljava/util/Collection;
.locals 1
.line 1
invoke-virtual {p0}, Lcom/google/common/collect/RegularImmutableTable;->createValues()Lcom/google/common/collect/ImmutableCollection;
move-result-object v0
return-object v0
.end method
.method public abstract getCell(I)Lcom/google/common/collect/Table$Cell;
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)",
"Lcom/google/common/collect/Table$Cell<",
"TR;TC;TV;>;"
}
.end annotation
.end method
.method public abstract getValue(I)Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)TV;"
}
.end annotation
.end method