p.smali
.class final Lcom/google/firebase/database/collection/p;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<A:",
"Ljava/lang/Object;",
"B:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# instance fields
.field private final bcv:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List",
"<TA;>;"
}
.end annotation
.end field
.field private final bcw:Lcom/google/firebase/database/collection/c;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/firebase/database/collection/c",
"<TA;TB;>;"
}
.end annotation
.end field
.field private bcx:Lcom/google/firebase/database/collection/k;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/firebase/database/collection/k",
"<TA;TC;>;"
}
.end annotation
.end field
.field private bcy:Lcom/google/firebase/database/collection/k;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/google/firebase/database/collection/k",
"<TA;TC;>;"
}
.end annotation
.end field
.field private final values:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map",
"<TB;TC;>;"
}
.end annotation
.end field
# direct methods
.method private constructor <init>(Ljava/util/List;Ljava/util/Map;Lcom/google/firebase/database/collection/c;)V
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<TA;>;",
"Ljava/util/Map",
"<TB;TC;>;",
"Lcom/google/firebase/database/collection/c",
"<TA;TB;>;)V"
}
.end annotation
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/firebase/database/collection/p;->bcv:Ljava/util/List;
iput-object p2, p0, Lcom/google/firebase/database/collection/p;->values:Ljava/util/Map;
iput-object p3, p0, Lcom/google/firebase/database/collection/p;->bcw:Lcom/google/firebase/database/collection/c;
return-void
.end method
.method private final a(Lcom/google/firebase/database/collection/LLRBNode$Color;II)V
.registers 9
const/4 v4, 0x0
add-int/lit8 v0, p3, 0x1
add-int/lit8 v1, p2, -0x1
invoke-direct {p0, v0, v1}, Lcom/google/firebase/database/collection/p;->am(II)Lcom/google/firebase/database/collection/LLRBNode;
move-result-object v1
iget-object v0, p0, Lcom/google/firebase/database/collection/p;->bcv:Ljava/util/List;
invoke-interface {v0, p3}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v2
sget-object v0, Lcom/google/firebase/database/collection/LLRBNode$Color;->zzn:Lcom/google/firebase/database/collection/LLRBNode$Color;
if-ne p1, v0, :cond_25
new-instance v0, Lcom/google/firebase/database/collection/j;
invoke-direct {p0, v2}, Lcom/google/firebase/database/collection/p;->zzd(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
invoke-direct {v0, v2, v3, v4, v1}, Lcom/google/firebase/database/collection/j;-><init>(Ljava/lang/Object;Ljava/lang/Object;Lcom/google/firebase/database/collection/LLRBNode;Lcom/google/firebase/database/collection/LLRBNode;)V
:goto_1c
iget-object v1, p0, Lcom/google/firebase/database/collection/p;->bcx:Lcom/google/firebase/database/collection/k;
if-nez v1, :cond_2f
iput-object v0, p0, Lcom/google/firebase/database/collection/p;->bcx:Lcom/google/firebase/database/collection/k;
iput-object v0, p0, Lcom/google/firebase/database/collection/p;->bcy:Lcom/google/firebase/database/collection/k;
:goto_24
return-void
:cond_25
new-instance v0, Lcom/google/firebase/database/collection/g;
invoke-direct {p0, v2}, Lcom/google/firebase/database/collection/p;->zzd(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
invoke-direct {v0, v2, v3, v4, v1}, Lcom/google/firebase/database/collection/g;-><init>(Ljava/lang/Object;Ljava/lang/Object;Lcom/google/firebase/database/collection/LLRBNode;Lcom/google/firebase/database/collection/LLRBNode;)V
goto :goto_1c
:cond_2f
iget-object v1, p0, Lcom/google/firebase/database/collection/p;->bcy:Lcom/google/firebase/database/collection/k;
invoke-virtual {v1, v0}, Lcom/google/firebase/database/collection/k;->a(Lcom/google/firebase/database/collection/LLRBNode;)V
iput-object v0, p0, Lcom/google/firebase/database/collection/p;->bcy:Lcom/google/firebase/database/collection/k;
goto :goto_24
.end method
.method private final am(II)Lcom/google/firebase/database/collection/LLRBNode;
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(II)",
"Lcom/google/firebase/database/collection/LLRBNode",
"<TA;TC;>;"
}
.end annotation
const/4 v3, 0x0
if-nez p2, :cond_8
invoke-static {}, Lcom/google/firebase/database/collection/h;->zj()Lcom/google/firebase/database/collection/h;
move-result-object v0
:goto_7
return-object v0
:cond_8
const/4 v0, 0x1
if-ne p2, v0, :cond_1b
iget-object v0, p0, Lcom/google/firebase/database/collection/p;->bcv:Ljava/util/List;
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v1
new-instance v0, Lcom/google/firebase/database/collection/g;
invoke-direct {p0, v1}, Lcom/google/firebase/database/collection/p;->zzd(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
invoke-direct {v0, v1, v2, v3, v3}, Lcom/google/firebase/database/collection/g;-><init>(Ljava/lang/Object;Ljava/lang/Object;Lcom/google/firebase/database/collection/LLRBNode;Lcom/google/firebase/database/collection/LLRBNode;)V
goto :goto_7
:cond_1b
div-int/lit8 v0, p2, 0x2
add-int v1, p1, v0
invoke-direct {p0, p1, v0}, Lcom/google/firebase/database/collection/p;->am(II)Lcom/google/firebase/database/collection/LLRBNode;
move-result-object v2
add-int/lit8 v3, v1, 0x1
invoke-direct {p0, v3, v0}, Lcom/google/firebase/database/collection/p;->am(II)Lcom/google/firebase/database/collection/LLRBNode;
move-result-object v3
iget-object v0, p0, Lcom/google/firebase/database/collection/p;->bcv:Ljava/util/List;
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v1
new-instance v0, Lcom/google/firebase/database/collection/g;
invoke-direct {p0, v1}, Lcom/google/firebase/database/collection/p;->zzd(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v4
invoke-direct {v0, v1, v4, v2, v3}, Lcom/google/firebase/database/collection/g;-><init>(Ljava/lang/Object;Ljava/lang/Object;Lcom/google/firebase/database/collection/LLRBNode;Lcom/google/firebase/database/collection/LLRBNode;)V
goto :goto_7
.end method
.method public static c(Ljava/util/List;Ljava/util/Map;Lcom/google/firebase/database/collection/c;Ljava/util/Comparator;)Lcom/google/firebase/database/collection/o;
.registers 10
.annotation system Ldalvik/annotation/Signature;
value = {
"<A:",
"Ljava/lang/Object;",
"B:",
"Ljava/lang/Object;",
"C:",
"Ljava/lang/Object;",
">(",
"Ljava/util/List",
"<TA;>;",
"Ljava/util/Map",
"<TB;TC;>;",
"Lcom/google/firebase/database/collection/c",
"<TA;TB;>;",
"Ljava/util/Comparator",
"<TA;>;)",
"Lcom/google/firebase/database/collection/o",
"<TA;TC;>;"
}
.end annotation
new-instance v2, Lcom/google/firebase/database/collection/p;
invoke-direct {v2, p0, p1, p2}, Lcom/google/firebase/database/collection/p;-><init>(Ljava/util/List;Ljava/util/Map;Lcom/google/firebase/database/collection/c;)V
invoke-static {p0, p3}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
new-instance v0, Lcom/google/firebase/database/collection/q;
invoke-interface {p0}, Ljava/util/List;->size()I
move-result v1
invoke-direct {v0, v1}, Lcom/google/firebase/database/collection/q;-><init>(I)V
invoke-virtual {v0}, Lcom/google/firebase/database/collection/q;->iterator()Ljava/util/Iterator;
move-result-object v3
invoke-interface {p0}, Ljava/util/List;->size()I
move-result v0
move v1, v0
:goto_1a
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_47
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/google/firebase/database/collection/s;
iget v4, v0, Lcom/google/firebase/database/collection/s;->bcA:I
sub-int/2addr v1, v4
iget-boolean v4, v0, Lcom/google/firebase/database/collection/s;->zzaa:Z
if-eqz v4, :cond_35
sget-object v4, Lcom/google/firebase/database/collection/LLRBNode$Color;->zzo:Lcom/google/firebase/database/collection/LLRBNode$Color;
iget v0, v0, Lcom/google/firebase/database/collection/s;->bcA:I
invoke-direct {v2, v4, v0, v1}, Lcom/google/firebase/database/collection/p;->a(Lcom/google/firebase/database/collection/LLRBNode$Color;II)V
goto :goto_1a
:cond_35
sget-object v4, Lcom/google/firebase/database/collection/LLRBNode$Color;->zzo:Lcom/google/firebase/database/collection/LLRBNode$Color;
iget v5, v0, Lcom/google/firebase/database/collection/s;->bcA:I
invoke-direct {v2, v4, v5, v1}, Lcom/google/firebase/database/collection/p;->a(Lcom/google/firebase/database/collection/LLRBNode$Color;II)V
iget v4, v0, Lcom/google/firebase/database/collection/s;->bcA:I
sub-int/2addr v1, v4
sget-object v4, Lcom/google/firebase/database/collection/LLRBNode$Color;->zzn:Lcom/google/firebase/database/collection/LLRBNode$Color;
iget v0, v0, Lcom/google/firebase/database/collection/s;->bcA:I
invoke-direct {v2, v4, v0, v1}, Lcom/google/firebase/database/collection/p;->a(Lcom/google/firebase/database/collection/LLRBNode$Color;II)V
goto :goto_1a
:cond_47
new-instance v1, Lcom/google/firebase/database/collection/o;
iget-object v0, v2, Lcom/google/firebase/database/collection/p;->bcx:Lcom/google/firebase/database/collection/k;
if-nez v0, :cond_56
invoke-static {}, Lcom/google/firebase/database/collection/h;->zj()Lcom/google/firebase/database/collection/h;
move-result-object v0
:goto_51
const/4 v2, 0x0
invoke-direct {v1, v0, p3, v2}, Lcom/google/firebase/database/collection/o;-><init>(Lcom/google/firebase/database/collection/LLRBNode;Ljava/util/Comparator;B)V
return-object v1
:cond_56
iget-object v0, v2, Lcom/google/firebase/database/collection/p;->bcx:Lcom/google/firebase/database/collection/k;
goto :goto_51
.end method
.method private final zzd(Ljava/lang/Object;)Ljava/lang/Object;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(TA;)TC;"
}
.end annotation
iget-object v0, p0, Lcom/google/firebase/database/collection/p;->values:Ljava/util/Map;
iget-object v1, p0, Lcom/google/firebase/database/collection/p;->bcw:Lcom/google/firebase/database/collection/c;
invoke-interface {v1, p1}, Lcom/google/firebase/database/collection/c;->al(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
invoke-interface {v0, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method