Files
rr3-apk/decompiled/sources/kotlin/collections/SetsKt___SetsKt.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

56 lines
1.9 KiB
Java

package kotlin.collections;
import java.util.LinkedHashSet;
import java.util.Set;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes5.dex */
public abstract class SetsKt___SetsKt extends SetsKt__SetsKt {
public static Set minus(Set set, Object obj) {
int mapCapacity;
Intrinsics.checkNotNullParameter(set, "<this>");
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(set.size());
LinkedHashSet linkedHashSet = new LinkedHashSet(mapCapacity);
boolean z = false;
for (Object obj2 : set) {
boolean z2 = true;
if (!z && Intrinsics.areEqual(obj2, obj)) {
z = true;
z2 = false;
}
if (z2) {
linkedHashSet.add(obj2);
}
}
return linkedHashSet;
}
public static Set plus(Set set, Object obj) {
int mapCapacity;
Intrinsics.checkNotNullParameter(set, "<this>");
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(set.size() + 1);
LinkedHashSet linkedHashSet = new LinkedHashSet(mapCapacity);
linkedHashSet.addAll(set);
linkedHashSet.add(obj);
return linkedHashSet;
}
public static Set plus(Set set, Iterable elements) {
int size;
int mapCapacity;
Intrinsics.checkNotNullParameter(set, "<this>");
Intrinsics.checkNotNullParameter(elements, "elements");
Integer collectionSizeOrNull = CollectionsKt__IterablesKt.collectionSizeOrNull(elements);
if (collectionSizeOrNull != null) {
size = set.size() + collectionSizeOrNull.intValue();
} else {
size = set.size() * 2;
}
mapCapacity = MapsKt__MapsJVMKt.mapCapacity(size);
LinkedHashSet linkedHashSet = new LinkedHashSet(mapCapacity);
linkedHashSet.addAll(set);
CollectionsKt__MutableCollectionsKt.addAll(linkedHashSet, elements);
return linkedHashSet;
}
}