428 lines
10 KiB
Smali
428 lines
10 KiB
Smali
.class public final Lcom/discord/utilities/collections/LeastRecentlyAddedSet;
|
|
.super Ljava/lang/Object;
|
|
.source "LeastRecentlyAddedSet.kt"
|
|
|
|
# interfaces
|
|
.implements Ljava/util/Set;
|
|
.implements Lkotlin/jvm/internal/a/h;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<E:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Ljava/util/Set<",
|
|
"TE;>;",
|
|
"Lkotlin/jvm/internal/a/h;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final _set:Ljava/util/LinkedHashSet;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/LinkedHashSet<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private final maxSize:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x3
|
|
|
|
invoke-direct {p0, v1, v0, v2, v0}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;-><init>(ILjava/util/LinkedHashSet;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(ILjava/util/LinkedHashSet;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Ljava/util/LinkedHashSet<",
|
|
"TE;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "_set"
|
|
|
|
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 p1, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->maxSize:I
|
|
|
|
iput-object p2, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(ILjava/util/LinkedHashSet;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p3, 0x1
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
const/4 p1, 0x3
|
|
|
|
:cond_0
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
new-instance p2, Ljava/util/LinkedHashSet;
|
|
|
|
invoke-direct {p2, p1}, Ljava/util/LinkedHashSet;-><init>(I)V
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;-><init>(ILjava/util/LinkedHashSet;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final declared-synchronized add(Ljava/lang/Object;)Z
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v1}, Ljava/util/LinkedHashSet;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "_set.iterator()"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v2}, Ljava/util/LinkedHashSet;->size()I
|
|
|
|
move-result v2
|
|
|
|
iget v3, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->maxSize:I
|
|
|
|
if-lt v2, v3, :cond_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->remove()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/util/LinkedHashSet;->add(Ljava/lang/Object;)Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const/4 p1, 0x1
|
|
|
|
:goto_1
|
|
monitor-exit p0
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
throw p1
|
|
|
|
:goto_3
|
|
goto :goto_2
|
|
.end method
|
|
|
|
.method public final addAll(Ljava/util/Collection;)Z
|
|
.locals 1
|
|
.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
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->addAll(Ljava/util/Collection;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final clear()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashSet;->clear()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final contains(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final containsAll(Ljava/util/Collection;)Z
|
|
.locals 1
|
|
.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/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->containsAll(Ljava/util/Collection;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getMaxSize()I
|
|
.locals 1
|
|
|
|
iget v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->maxSize:I
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getSize()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashSet;->size()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isEmpty()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashSet;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final iterator()Ljava/util/Iterator;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Iterator<",
|
|
"TE;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0}, Ljava/util/LinkedHashSet;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "iterator(...)"
|
|
|
|
invoke-static {v0, v1}, Lkotlin/jvm/internal/k;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final remove(Ljava/lang/Object;)Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->remove(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final removeAll(Ljava/util/Collection;)Z
|
|
.locals 1
|
|
.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/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->removeAll(Ljava/util/Collection;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final retainAll(Ljava/util/Collection;)Z
|
|
.locals 1
|
|
.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/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedHashSet;->retainAll(Ljava/util/Collection;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final size()I
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->getSize()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final toArray()[Ljava/lang/Object;
|
|
.locals 1
|
|
|
|
invoke-static {p0}, Lkotlin/jvm/internal/f;->j(Ljava/util/Collection;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final 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
|
|
|
|
.method public final toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "LRA Set "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/collections/LeastRecentlyAddedSet;->_set:Ljava/util/LinkedHashSet;
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
invoke-static {v1}, Lkotlin/a/l;->m(Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|