671 lines
16 KiB
Smali
671 lines
16 KiB
Smali
.class public Lcom/discord/utilities/collections/ShallowPartitionCollection;
|
|
.super Ljava/lang/Object;
|
|
.source "ShallowPartitionCollection.kt"
|
|
|
|
# interfaces
|
|
.implements Ljava/util/Collection;
|
|
.implements Lkotlin/jvm/internal/a/b;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<E:",
|
|
"Ljava/lang/Object;",
|
|
"T::",
|
|
"Ljava/util/Collection<",
|
|
"TE;>;>",
|
|
"Ljava/lang/Object;",
|
|
"Ljava/util/Collection<",
|
|
"TE;>;",
|
|
"Lkotlin/jvm/internal/a/b;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field private final partitionStrategy:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"TE;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final partitions:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private size:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->Companion:Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/util/List;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"+TT;>;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-TE;",
|
|
"Ljava/lang/Integer;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "partitions"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "partitionStrategy"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
iput-object p2, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitionStrategy:Lkotlin/jvm/functions/Function1;
|
|
|
|
iget-object p1, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
check-cast p1, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
invoke-interface {v0}, Ljava/util/Collection;->size()I
|
|
|
|
move-result v0
|
|
|
|
add-int/2addr p2, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iput p2, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->size:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getPartition(Ljava/lang/Object;)Ljava/util/Collection;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;)TT;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitionStrategy:Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-interface {v1, 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
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/util/Collection;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static final withArrayListParitions(ILkotlin/jvm/functions/Function1;)Lcom/discord/utilities/collections/ShallowPartitionCollection;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<E:",
|
|
"Ljava/lang/Object;",
|
|
">(I",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-TE;",
|
|
"Ljava/lang/Integer;",
|
|
">;)",
|
|
"Lcom/discord/utilities/collections/ShallowPartitionCollection<",
|
|
"TE;",
|
|
"Ljava/util/ArrayList<",
|
|
"TE;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->Companion:Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/discord/utilities/collections/ShallowPartitionCollection$Companion;->withArrayListParitions(ILkotlin/jvm/functions/Function1;)Lcom/discord/utilities/collections/ShallowPartitionCollection;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public add(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->getPartition(Ljava/lang/Object;)Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->size()I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->setSize(I)V
|
|
|
|
:cond_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public addAll(Ljava/util/Collection;)Z
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"+TE;>;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "elements"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
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
|
|
|
|
invoke-virtual {p0, v2}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->add(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method public clear()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
check-cast v0, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Collection;
|
|
|
|
invoke-interface {v1}, Ljava/util/Collection;->clear()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v0, Lkotlin/Unit;->bjF:Lkotlin/Unit;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->setSize(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public contains(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->getPartition(Ljava/lang/Object;)Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public containsAll(Ljava/util/Collection;)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"+",
|
|
"Ljava/lang/Object;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "elements"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
check-cast v0, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Collection;
|
|
|
|
check-cast p1, Ljava/util/Collection;
|
|
|
|
check-cast p1, Ljava/lang/Iterable;
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
invoke-static {p1, v1}, Lkotlin/a/m;->b(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
check-cast p1, Ljava/util/Collection;
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method protected final getPartitionStrategy()Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"TE;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitionStrategy:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected final getPartitions()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getSize()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->size:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isEmpty()Z
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public iterator()Lcom/discord/utilities/collections/MutablePartitionedIterator;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lcom/discord/utilities/collections/MutablePartitionedIterator<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/utilities/collections/MutablePartitionedIterator;
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/collections/MutablePartitionedIterator;-><init>(Ljava/util/Iterator;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public bridge synthetic iterator()Ljava/util/Iterator;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->iterator()Lcom/discord/utilities/collections/MutablePartitionedIterator;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/Iterator;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public remove(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->getPartition(Ljava/lang/Object;)Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Collection;->remove(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->size()I
|
|
|
|
move-result v0
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->setSize(I)V
|
|
|
|
:cond_0
|
|
return p1
|
|
.end method
|
|
|
|
.method public removeAll(Ljava/util/Collection;)Z
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"+",
|
|
"Ljava/lang/Object;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "elements"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
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
|
|
|
|
invoke-virtual {p0, v2}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->remove(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method public retainAll(Ljava/util/Collection;)Z
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"+",
|
|
"Ljava/lang/Object;",
|
|
">;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "elements"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->partitions:Ljava/util/List;
|
|
|
|
check-cast v0, Ljava/lang/Iterable;
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/util/Collection;
|
|
|
|
invoke-interface {v3, p1}, Ljava/util/Collection;->retainAll(Ljava/util/Collection;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v2
|
|
.end method
|
|
|
|
.method public setSize(I)V
|
|
.locals 0
|
|
|
|
iput p1, p0, Lcom/discord/utilities/collections/ShallowPartitionCollection;->size:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final size()I
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/ShallowPartitionCollection;->getSize()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toArray()[Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lkotlin/jvm/internal/f;->k(Ljava/util/Collection;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">([TT;)[TT;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {p0, p1}, Lkotlin/jvm/internal/f;->a(Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|