Files
rr3-apk/decompiled/sources/kotlin/collections/ArrayAsCollection.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

104 lines
3.2 KiB
Java

package kotlin.collections;
import java.util.Collection;
import java.util.Iterator;
import kotlin.jvm.internal.ArrayIteratorKt;
import kotlin.jvm.internal.CollectionToArray;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.markers.KMappedMarker;
/* loaded from: classes5.dex */
public final class ArrayAsCollection implements Collection, KMappedMarker {
public final boolean isVarargs;
public final Object[] values;
@Override // java.util.Collection
public boolean add(Object obj) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean addAll(Collection collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public void clear() {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean remove(Object obj) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean removeAll(Collection collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public boolean retainAll(Collection collection) {
throw new UnsupportedOperationException("Operation is not supported for read-only collection");
}
@Override // java.util.Collection
public Object[] toArray(Object[] array) {
Intrinsics.checkNotNullParameter(array, "array");
return CollectionToArray.toArray(this, array);
}
public ArrayAsCollection(Object[] values, boolean z) {
Intrinsics.checkNotNullParameter(values, "values");
this.values = values;
this.isVarargs = z;
}
@Override // java.util.Collection
public final /* bridge */ int size() {
return getSize();
}
public int getSize() {
return this.values.length;
}
@Override // java.util.Collection
public boolean isEmpty() {
return this.values.length == 0;
}
@Override // java.util.Collection
public boolean contains(Object obj) {
boolean contains;
contains = ArraysKt___ArraysKt.contains(this.values, obj);
return contains;
}
@Override // java.util.Collection
public boolean containsAll(Collection elements) {
Intrinsics.checkNotNullParameter(elements, "elements");
Collection collection = elements;
if (collection.isEmpty()) {
return true;
}
Iterator it = collection.iterator();
while (it.hasNext()) {
if (!contains(it.next())) {
return false;
}
}
return true;
}
@Override // java.util.Collection, java.lang.Iterable
public Iterator iterator() {
return ArrayIteratorKt.iterator(this.values);
}
@Override // java.util.Collection
public final Object[] toArray() {
return CollectionsKt__CollectionsJVMKt.copyToArrayOfAny(this.values, this.isVarargs);
}
}