2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;
|
|
|
|
.super Lcom/discord/utilities/collections/ShallowPartitionMap;
|
|
|
|
.source "ShallowPartitionMap.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/utilities/collections/ShallowPartitionMap;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x9
|
|
|
|
name = "CopiablePartitionMap"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<K:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
"V:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Lcom/discord/utilities/collections/ShallowPartitionMap<",
|
|
|
|
"TK;TV;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public defensiveCopyPartitions:Ljava/util/List;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/HashSet<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(ILkotlin/jvm/functions/Function1;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(I",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-TK;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/collections/ShallowPartitionMap;-><init>(ILkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lf/m/b/f/a;->getIndices(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/i/l;->toHashSet(Ljava/lang/Iterable;)Ljava/util/HashSet;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopy(Ljava/util/List;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopyPartitions:Ljava/util/List;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, "partitionStrategy"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public clear()V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v1}, Lf/m/b/f/a;->getIndices(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lf/m/b/f/a;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-super {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->clear()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final defensiveCopy(Ljava/util/List;)Ljava/util/List;
|
|
|
|
.locals 7
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;)",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v2, 0xa
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, v2}, Lf/m/b/f/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
add-int/lit8 v4, v2, 0x1
|
|
|
|
|
|
|
|
if-ltz v2, :cond_1
|
|
|
|
|
|
|
|
check-cast v3, Ljava/util/Map;
|
|
|
|
|
|
|
|
iget-object v5, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v6
|
|
|
|
|
|
|
|
invoke-virtual {v5, v6}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
|
|
|
|
new-instance v3, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-direct {v3, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {v1, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move v2, v4
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {}, Lf/m/b/f/a;->throwIndexOverflow()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "$this$defensiveCopy"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public fastCopy()Ljava/util/Map;
|
|
|
|
.locals 3
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopyPartitions:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopy(Ljava/util/List;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->setDefensiveCopyPartitions(Ljava/util/List;)V
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/utilities/collections/ShallowPartitionMap;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopyPartitions:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitionStrategy()Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-direct {v0, v1, v2}, Lcom/discord/utilities/collections/ShallowPartitionMap;-><init>(Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getDefensiveCopyPartitions()Ljava/util/List;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopyPartitions:Ljava/util/List;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public getPartitionForWrite(Ljava/lang/Object;)Ljava/util/Map;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(TK;)",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitionStrategy()Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/lang/Number;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Number;->intValue()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final setDefensiveCopyPartitions(Ljava/util/List;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->defensiveCopyPartitions:Ljava/util/List;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/util/HashSet;->clear()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo p1, "value"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|