2291 lines
63 KiB
Smali
2291 lines
63 KiB
Smali
.class final Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.super Ljava/lang/Object;
|
|
.source "TreeMultiset.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/google/common/collect/TreeMultiset;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "AvlNode"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<E:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private distinctElements:I
|
|
|
|
.field private final elem:Ljava/lang/Object;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"TE;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private elemCount:I
|
|
|
|
.field private height:I
|
|
|
|
.field private left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private pred:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private succ:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private totalCount:J
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 10
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 11
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elem:Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 12
|
|
iput v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/lang/Object;I)V
|
|
.locals 2
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;I)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-lez p2, :cond_0
|
|
|
|
move v1, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
.line 2
|
|
:goto_0
|
|
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
|
|
|
.line 3
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elem:Ljava/lang/Object;
|
|
|
|
.line 4
|
|
iput p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
int-to-long p1, p2
|
|
|
|
.line 5
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 6
|
|
iput v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 7
|
|
iput v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 8
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 9
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$1000(Lcom/google/common/collect/TreeMultiset$AvlNode;Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->ceiling(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$1100(Lcom/google/common/collect/TreeMultiset$AvlNode;Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->floor(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$1200(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->pred()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$200(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget p0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static synthetic access$202(Lcom/google/common/collect/TreeMultiset$AvlNode;I)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$300(Lcom/google/common/collect/TreeMultiset$AvlNode;)J
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method public static synthetic access$400(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget p0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static synthetic access$500(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$502(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$600(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iget-object p0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$602(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$700(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->succ()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic access$802(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->pred:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$902(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 0
|
|
|
|
.line 1
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->succ:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private addLeftChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 2
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;I)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;-><init>(Ljava/lang/Object;I)V
|
|
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->pred()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {p1, v0, p0}, Lcom/google/common/collect/TreeMultiset;->access$1800(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)V
|
|
|
|
.line 3
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
const/4 v0, 0x2
|
|
|
|
invoke-static {v0, p1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
.line 4
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 5
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long p1, p2
|
|
|
|
add-long/2addr v0, p1
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private addRightChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 2
|
|
.param p1 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;I)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;-><init>(Ljava/lang/Object;I)V
|
|
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->succ()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, v0, p1}, Lcom/google/common/collect/TreeMultiset;->access$1800(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)V
|
|
|
|
.line 3
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
const/4 v0, 0x2
|
|
|
|
invoke-static {v0, p1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
.line 4
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 5
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long p1, p2
|
|
|
|
add-long/2addr v0, p1
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private balanceFactor()I
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->height(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->height(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
|
|
move-result v1
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method private ceiling(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 1
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
move-object p1, p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->ceiling(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, p0}, Lcom/google/common/base/MoreObjects;->firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
:goto_0
|
|
return-object p1
|
|
|
|
:cond_1
|
|
if-nez v0, :cond_2
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->ceiling(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_1
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private deleteMe()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 6
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 2
|
|
iput v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
.line 3
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->pred()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->succ()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Lcom/google/common/collect/TreeMultiset;->access$1900(Lcom/google/common/collect/TreeMultiset$AvlNode;Lcom/google/common/collect/TreeMultiset$AvlNode;)V
|
|
|
|
.line 4
|
|
iget-object v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object v0
|
|
|
|
.line 6
|
|
:cond_0
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
return-object v1
|
|
|
|
.line 7
|
|
:cond_1
|
|
iget v1, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
iget v2, v2, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
if-lt v1, v2, :cond_2
|
|
|
|
.line 8
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->pred()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v1
|
|
|
|
.line 9
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v2, v1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->removeMax(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v2
|
|
|
|
iput-object v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 10
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
iput-object v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 11
|
|
iget v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
iput v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 12
|
|
iget-wide v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long v4, v0
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
iput-wide v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 13
|
|
invoke-direct {v1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 14
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->succ()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v1
|
|
|
|
.line 15
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v2, v1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->removeMin(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v2
|
|
|
|
iput-object v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 16
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
iput-object v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 17
|
|
iget v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 v2, v2, -0x1
|
|
|
|
iput v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 18
|
|
iget-wide v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long v4, v0
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
iput-wide v2, v1, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 19
|
|
invoke-direct {v1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private floor(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 1
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
move-object p1, p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->floor(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, p0}, Lcom/google/common/base/MoreObjects;->firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
:goto_0
|
|
return-object p1
|
|
|
|
:cond_1
|
|
if-nez v0, :cond_2
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-direct {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->floor(Ljava/util/Comparator;Ljava/lang/Object;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_1
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private static height(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
.locals 0
|
|
.param p0 # Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"*>;)I"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 1
|
|
:cond_0
|
|
iget p0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method private pred()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->pred:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->balanceFactor()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, -0x2
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recomputeHeight()V
|
|
|
|
return-object p0
|
|
|
|
.line 3
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 4
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->balanceFactor()I
|
|
|
|
move-result v0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
.line 5
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rotateLeft()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 6
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rotateRight()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 7
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 8
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->balanceFactor()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_3
|
|
|
|
.line 9
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-direct {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rotateRight()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 10
|
|
:cond_3
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rotateLeft()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private recompute()V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recomputeMultiset()V
|
|
|
|
.line 2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recomputeHeight()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private recomputeHeight()V
|
|
.locals 2
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->height(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->height(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iput v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private recomputeMultiset()V
|
|
.locals 4
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 2
|
|
invoke-static {v0}, Lcom/google/common/collect/TreeMultiset;->distinctElements(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
iget-object v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v1}, Lcom/google/common/collect/TreeMultiset;->distinctElements(Lcom/google/common/collect/TreeMultiset$AvlNode;)I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
iput v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 3
|
|
iget v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
int-to-long v0, v0
|
|
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount(Lcom/google/common/collect/TreeMultiset$AvlNode;)J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount(Lcom/google/common/collect/TreeMultiset$AvlNode;)J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private removeMax(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p1
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-direct {v0, p1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->removeMax(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 4
|
|
iget v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
iput v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 5
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
iget p1, p1, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
int-to-long v2, p1
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 6
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private removeMin(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 2
|
|
iget-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
return-object p1
|
|
|
|
.line 3
|
|
:cond_0
|
|
invoke-direct {v0, p1}, Lcom/google/common/collect/TreeMultiset$AvlNode;->removeMin(Lcom/google/common/collect/TreeMultiset$AvlNode;)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 4
|
|
iget v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
iput v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 5
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
iget p1, p1, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
int-to-long v2, p1
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 6
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private rotateLeft()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 3
|
|
iget-object v1, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
iput-object v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 4
|
|
iput-object p0, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 5
|
|
iget-wide v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
iput-wide v1, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 6
|
|
iget v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
iput v1, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 7
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recompute()V
|
|
|
|
.line 8
|
|
invoke-direct {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recomputeHeight()V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private rotateRight()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkState(Z)V
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 3
|
|
iget-object v1, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
iput-object v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 4
|
|
iput-object p0, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 5
|
|
iget-wide v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
iput-wide v1, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 6
|
|
iget v1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
iput v1, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 7
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recompute()V
|
|
|
|
.line 8
|
|
invoke-direct {v0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->recomputeHeight()V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private succ()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->succ:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private static totalCount(Lcom/google/common/collect/TreeMultiset$AvlNode;)J
|
|
.locals 2
|
|
.param p0 # Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"*>;)J"
|
|
}
|
|
.end annotation
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 1
|
|
:cond_0
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
:goto_0
|
|
return-wide v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public add(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 7
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;I[I)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-gez v0, :cond_3
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 3
|
|
aput v2, p4, v2
|
|
|
|
.line 4
|
|
invoke-direct {p0, p2, p3}, Lcom/google/common/collect/TreeMultiset$AvlNode;->addLeftChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 5
|
|
:cond_0
|
|
iget v3, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
.line 6
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->add(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 7
|
|
aget p2, p4, v2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
.line 8
|
|
iget p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/2addr p2, v1
|
|
|
|
iput p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 9
|
|
:cond_1
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long p2, p3
|
|
|
|
add-long/2addr v0, p2
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 10
|
|
iget p1, p1, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
if-ne p1, v3, :cond_2
|
|
|
|
move-object p1, p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
return-object p1
|
|
|
|
:cond_3
|
|
if-lez v0, :cond_7
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
.line 12
|
|
aput v2, p4, v2
|
|
|
|
.line 13
|
|
invoke-direct {p0, p2, p3}, Lcom/google/common/collect/TreeMultiset$AvlNode;->addRightChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 14
|
|
:cond_4
|
|
iget v3, v0, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
.line 15
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->add(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 16
|
|
aget p2, p4, v2
|
|
|
|
if-nez p2, :cond_5
|
|
|
|
.line 17
|
|
iget p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/2addr p2, v1
|
|
|
|
iput p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 18
|
|
:cond_5
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long p2, p3
|
|
|
|
add-long/2addr v0, p2
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 19
|
|
iget p1, p1, Lcom/google/common/collect/TreeMultiset$AvlNode;->height:I
|
|
|
|
if-ne p1, v3, :cond_6
|
|
|
|
move-object p1, p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_1
|
|
return-object p1
|
|
|
|
.line 20
|
|
:cond_7
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
aput p1, p4, v2
|
|
|
|
int-to-long p1, p1
|
|
|
|
int-to-long v3, p3
|
|
|
|
add-long/2addr p1, v3
|
|
|
|
const-wide/32 v5, 0x7fffffff
|
|
|
|
cmp-long p1, p1, v5
|
|
|
|
if-gtz p1, :cond_8
|
|
|
|
goto :goto_2
|
|
|
|
:cond_8
|
|
move v1, v2
|
|
|
|
.line 21
|
|
:goto_2
|
|
invoke-static {v1}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
|
|
|
.line 22
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
add-int/2addr p1, p3
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
.line 23
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
add-long/2addr p1, v3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public count(Ljava/util/Comparator;Ljava/lang/Object;)I
|
|
.locals 2
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;)I"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->count(Ljava/util/Comparator;Ljava/lang/Object;)I
|
|
|
|
move-result v1
|
|
|
|
:goto_0
|
|
return v1
|
|
|
|
:cond_1
|
|
if-lez v0, :cond_3
|
|
|
|
.line 3
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
invoke-virtual {v0, p1, p2}, Lcom/google/common/collect/TreeMultiset$AvlNode;->count(Ljava/util/Comparator;Ljava/lang/Object;)I
|
|
|
|
move-result v1
|
|
|
|
:goto_1
|
|
return v1
|
|
|
|
.line 4
|
|
:cond_3
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public getCount()I
|
|
.locals 1
|
|
|
|
.line 1
|
|
iget v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public getElement()Ljava/lang/Object;
|
|
.locals 1
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TE;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elem:Ljava/lang/Object;
|
|
|
|
invoke-static {v0}, Lcom/google/common/collect/NullnessCasts;->uncheckedCastNullableTToT(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public remove(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 4
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;I[I)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-gez v0, :cond_4
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 3
|
|
aput v1, p4, v1
|
|
|
|
return-object p0
|
|
|
|
.line 4
|
|
:cond_0
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->remove(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 5
|
|
aget p1, p4, v1
|
|
|
|
if-lez p1, :cond_2
|
|
|
|
.line 6
|
|
aget p1, p4, v1
|
|
|
|
if-lt p3, p1, :cond_1
|
|
|
|
.line 7
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 8
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
aget p3, p4, v1
|
|
|
|
int-to-long v2, p3
|
|
|
|
sub-long/2addr p1, v2
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
goto :goto_0
|
|
|
|
.line 9
|
|
:cond_1
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long v2, p3
|
|
|
|
sub-long/2addr p1, v2
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 10
|
|
:cond_2
|
|
:goto_0
|
|
aget p1, p4, v1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
move-object p1, p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_1
|
|
return-object p1
|
|
|
|
:cond_4
|
|
if-lez v0, :cond_8
|
|
|
|
.line 11
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
.line 12
|
|
aput v1, p4, v1
|
|
|
|
return-object p0
|
|
|
|
.line 13
|
|
:cond_5
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->remove(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 14
|
|
aget p1, p4, v1
|
|
|
|
if-lez p1, :cond_7
|
|
|
|
.line 15
|
|
aget p1, p4, v1
|
|
|
|
if-lt p3, p1, :cond_6
|
|
|
|
.line 16
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 17
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
aget p3, p4, v1
|
|
|
|
int-to-long p3, p3
|
|
|
|
sub-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
goto :goto_2
|
|
|
|
.line 18
|
|
:cond_6
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long p3, p3
|
|
|
|
sub-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 19
|
|
:cond_7
|
|
:goto_2
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 20
|
|
:cond_8
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
aput p1, p4, v1
|
|
|
|
if-lt p3, p1, :cond_9
|
|
|
|
.line 21
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->deleteMe()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_9
|
|
sub-int/2addr p1, p3
|
|
|
|
.line 22
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
.line 23
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
int-to-long p3, p3
|
|
|
|
sub-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setCount(Ljava/util/Comparator;Ljava/lang/Object;II[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 8
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;II[I)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 26
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-gez v0, :cond_5
|
|
|
|
.line 27
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
.line 28
|
|
aput v1, p5, v1
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
if-lez p4, :cond_0
|
|
|
|
.line 29
|
|
invoke-direct {p0, p2, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->addLeftChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
return-object p0
|
|
|
|
:cond_1
|
|
move-object v3, p1
|
|
|
|
move-object v4, p2
|
|
|
|
move v5, p3
|
|
|
|
move v6, p4
|
|
|
|
move-object v7, p5
|
|
|
|
.line 30
|
|
invoke-virtual/range {v2 .. v7}, Lcom/google/common/collect/TreeMultiset$AvlNode;->setCount(Ljava/util/Comparator;Ljava/lang/Object;II[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 31
|
|
aget p1, p5, v1
|
|
|
|
if-ne p1, p3, :cond_4
|
|
|
|
if-nez p4, :cond_2
|
|
|
|
.line 32
|
|
aget p1, p5, v1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 33
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-lez p4, :cond_3
|
|
|
|
.line 34
|
|
aget p1, p5, v1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
.line 35
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 36
|
|
:cond_3
|
|
:goto_0
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
aget p3, p5, v1
|
|
|
|
sub-int/2addr p4, p3
|
|
|
|
int-to-long p3, p4
|
|
|
|
add-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 37
|
|
:cond_4
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_5
|
|
if-lez v0, :cond_b
|
|
|
|
.line 38
|
|
iget-object v2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v2, :cond_7
|
|
|
|
.line 39
|
|
aput v1, p5, v1
|
|
|
|
if-nez p3, :cond_6
|
|
|
|
if-lez p4, :cond_6
|
|
|
|
.line 40
|
|
invoke-direct {p0, p2, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->addRightChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_6
|
|
return-object p0
|
|
|
|
:cond_7
|
|
move-object v3, p1
|
|
|
|
move-object v4, p2
|
|
|
|
move v5, p3
|
|
|
|
move v6, p4
|
|
|
|
move-object v7, p5
|
|
|
|
.line 41
|
|
invoke-virtual/range {v2 .. v7}, Lcom/google/common/collect/TreeMultiset$AvlNode;->setCount(Ljava/util/Comparator;Ljava/lang/Object;II[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
.line 42
|
|
aget p1, p5, v1
|
|
|
|
if-ne p1, p3, :cond_a
|
|
|
|
if-nez p4, :cond_8
|
|
|
|
.line 43
|
|
aget p1, p5, v1
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
.line 44
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_8
|
|
if-lez p4, :cond_9
|
|
|
|
.line 45
|
|
aget p1, p5, v1
|
|
|
|
if-nez p1, :cond_9
|
|
|
|
.line 46
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 47
|
|
:cond_9
|
|
:goto_1
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
aget p3, p5, v1
|
|
|
|
sub-int/2addr p4, p3
|
|
|
|
int-to-long p3, p4
|
|
|
|
add-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 48
|
|
:cond_a
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 49
|
|
:cond_b
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
aput p1, p5, v1
|
|
|
|
if-ne p3, p1, :cond_d
|
|
|
|
if-nez p4, :cond_c
|
|
|
|
.line 50
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->deleteMe()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 51
|
|
:cond_c
|
|
iget-wide p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
sub-int p1, p4, p1
|
|
|
|
int-to-long v0, p1
|
|
|
|
add-long/2addr p2, v0
|
|
|
|
iput-wide p2, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 52
|
|
iput p4, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
:cond_d
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public setCount(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
.locals 2
|
|
.param p2 # Ljava/lang/Object;
|
|
.annotation runtime Lcom/google/common/collect/ParametricNullness;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Comparator<",
|
|
"-TE;>;TE;I[I)",
|
|
"Lcom/google/common/collect/TreeMultiset$AvlNode<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Ljavax/annotation/CheckForNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, p2, v0}, Ljava/util/Comparator;->compare(Ljava/lang/Object;Ljava/lang/Object;)I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-gez v0, :cond_4
|
|
|
|
.line 2
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 3
|
|
aput v1, p4, v1
|
|
|
|
if-lez p3, :cond_0
|
|
|
|
.line 4
|
|
invoke-direct {p0, p2, p3}, Lcom/google/common/collect/TreeMultiset$AvlNode;->addLeftChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object p1, p0
|
|
|
|
:goto_0
|
|
return-object p1
|
|
|
|
.line 5
|
|
:cond_1
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->setCount(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->left:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez p3, :cond_2
|
|
|
|
.line 6
|
|
aget p1, p4, v1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 7
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
if-lez p3, :cond_3
|
|
|
|
.line 8
|
|
aget p1, p4, v1
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
.line 9
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 10
|
|
:cond_3
|
|
:goto_1
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
aget p4, p4, v1
|
|
|
|
sub-int/2addr p3, p4
|
|
|
|
int-to-long p3, p3
|
|
|
|
add-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 11
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
if-lez v0, :cond_9
|
|
|
|
.line 12
|
|
iget-object v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez v0, :cond_6
|
|
|
|
.line 13
|
|
aput v1, p4, v1
|
|
|
|
if-lez p3, :cond_5
|
|
|
|
.line 14
|
|
invoke-direct {p0, p2, p3}, Lcom/google/common/collect/TreeMultiset$AvlNode;->addRightChild(Ljava/lang/Object;I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
move-object p1, p0
|
|
|
|
:goto_2
|
|
return-object p1
|
|
|
|
.line 15
|
|
:cond_6
|
|
invoke-virtual {v0, p1, p2, p3, p4}, Lcom/google/common/collect/TreeMultiset$AvlNode;->setCount(Ljava/util/Comparator;Ljava/lang/Object;I[I)Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->right:Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
if-nez p3, :cond_7
|
|
|
|
.line 16
|
|
aget p1, p4, v1
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
.line 17
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
goto :goto_3
|
|
|
|
:cond_7
|
|
if-lez p3, :cond_8
|
|
|
|
.line 18
|
|
aget p1, p4, v1
|
|
|
|
if-nez p1, :cond_8
|
|
|
|
.line 19
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
iput p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->distinctElements:I
|
|
|
|
.line 20
|
|
:cond_8
|
|
:goto_3
|
|
iget-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
aget p4, p4, v1
|
|
|
|
sub-int/2addr p3, p4
|
|
|
|
int-to-long p3, p3
|
|
|
|
add-long/2addr p1, p3
|
|
|
|
iput-wide p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 21
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->rebalance()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 22
|
|
:cond_9
|
|
iget p1, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
aput p1, p4, v1
|
|
|
|
if-nez p3, :cond_a
|
|
|
|
.line 23
|
|
invoke-direct {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->deleteMe()Lcom/google/common/collect/TreeMultiset$AvlNode;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 24
|
|
:cond_a
|
|
iget-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
sub-int p1, p3, p1
|
|
|
|
int-to-long p1, p1
|
|
|
|
add-long/2addr v0, p1
|
|
|
|
iput-wide v0, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->totalCount:J
|
|
|
|
.line 25
|
|
iput p3, p0, Lcom/google/common/collect/TreeMultiset$AvlNode;->elemCount:I
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getElement()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/google/common/collect/TreeMultiset$AvlNode;->getCount()I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v0, v1}, Lcom/google/common/collect/Multisets;->immutableEntry(Ljava/lang/Object;I)Lcom/google/common/collect/Multiset$Entry;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lcom/google/common/collect/Multiset$Entry;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|