apkfuckery/com.discord/smali/kotlin/a/p.smali
2019-10-10 01:16:36 +02:00

184 lines
4 KiB
Smali

.class public Lkotlin/a/p;
.super Lkotlin/a/o;
.source "Iterables.kt"
# direct methods
.method public static final collectionSizeOrDefault(Ljava/lang/Iterable;I)I
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"+TT;>;I)I"
}
.end annotation
const-string v0, "$this$collectionSizeOrDefault"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
instance-of v0, p0, Ljava/util/Collection;
if-eqz v0, :cond_0
check-cast p0, Ljava/util/Collection;
invoke-interface {p0}, Ljava/util/Collection;->size()I
move-result p0
return p0
:cond_0
return p1
.end method
.method public static final convertToSetForSetOperationWith(Ljava/lang/Iterable;Ljava/lang/Iterable;)Ljava/util/Collection;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"+TT;>;",
"Ljava/lang/Iterable<",
"+TT;>;)",
"Ljava/util/Collection<",
"TT;>;"
}
.end annotation
const-string v0, "$this$convertToSetForSetOperationWith"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
instance-of v0, p0, Ljava/util/Set;
if-eqz v0, :cond_0
check-cast p0, Ljava/util/Collection;
return-object p0
:cond_0
instance-of v0, p0, Ljava/util/Collection;
if-eqz v0, :cond_3
instance-of v0, p1, Ljava/util/Collection;
const/4 v1, 0x2
if-eqz v0, :cond_1
check-cast p1, Ljava/util/Collection;
invoke-interface {p1}, Ljava/util/Collection;->size()I
move-result p1
if-ge p1, v1, :cond_1
check-cast p0, Ljava/util/Collection;
return-object p0
:cond_1
move-object p1, p0
check-cast p1, Ljava/util/Collection;
invoke-interface {p1}, Ljava/util/Collection;->size()I
move-result v0
if-le v0, v1, :cond_2
instance-of v0, p1, Ljava/util/ArrayList;
if-eqz v0, :cond_2
const/4 v0, 0x1
goto :goto_0
:cond_2
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_3
return-object p1
:cond_3
invoke-static {p0}, Lkotlin/a/m;->toHashSet(Ljava/lang/Iterable;)Ljava/util/HashSet;
move-result-object p0
check-cast p0, Ljava/util/Collection;
return-object p0
.end method
.method public static final flatten(Ljava/lang/Iterable;)Ljava/util/List;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"+",
"Ljava/lang/Iterable<",
"+TT;>;>;)",
"Ljava/util/List<",
"TT;>;"
}
.end annotation
const-string v0, "$this$flatten"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p0
:goto_0
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
if-eqz v1, :cond_0
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Ljava/lang/Iterable;
move-object v2, v0
check-cast v2, Ljava/util/Collection;
invoke-static {v2, v1}, Lkotlin/a/m;->addAll(Ljava/util/Collection;Ljava/lang/Iterable;)Z
goto :goto_0
:cond_0
check-cast v0, Ljava/util/List;
return-object v0
.end method