2020-11-12 02:11:44 +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
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public defensiveCopyPartitions:Ljava/util/List;
|
2020-11-12 02:11:44 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
.field public final dirtyPartitionIndices:Ljava/util/HashSet;
|
2020-11-12 02:11:44 +00:00
|
|
|
.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 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(I",
|
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"-TK;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string v0, "partitionStrategy"
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
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-11-16 01:00:50 +00:00
|
|
|
invoke-static {p1}, Lf/h/a/f/f/n/f;->getIndices(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {p1}, Lz/i/f;->toHashSet(Ljava/lang/Iterable;)Ljava/util/HashSet;
|
2020-11-12 02:11:44 +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
|
|
|
|
.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-11-16 01:00:50 +00:00
|
|
|
invoke-static {v1}, Lf/h/a/f/f/n/f;->getIndices(Ljava/util/Collection;)Lkotlin/ranges/IntRange;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {v0, v1}, Lf/h/a/f/f/n/f;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
|
2020-11-12 02:11:44 +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 6
|
|
|
|
.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-string v0, "$this$defensiveCopy"
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v1, 0xa
|
|
|
|
|
|
|
|
invoke-static {p1, v1}, Lf/h/a/f/f/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
add-int/lit8 v3, v1, 0x1
|
|
|
|
|
|
|
|
if-ltz v1, :cond_1
|
|
|
|
|
|
|
|
check-cast v2, Ljava/util/Map;
|
|
|
|
|
|
|
|
iget-object v4, p0, Lcom/discord/utilities/collections/ShallowPartitionMap$CopiablePartitionMap;->dirtyPartitionIndices:Ljava/util/HashSet;
|
|
|
|
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
new-instance v2, Ljava/util/HashMap;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionMap;->getPartitions()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v4, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-direct {v2, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move v1, v3
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {}, Lf/h/a/f/f/n/f;->throwIndexOverflow()V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return-object 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 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"TK;TV;>;>;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const-string/jumbo v0, "value"
|
|
|
|
|
2020-11-16 01:00:50 +00:00
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
.end method
|