- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
134 lines
5.0 KiB
Java
134 lines
5.0 KiB
Java
package androidx.core.util;
|
|
|
|
import android.util.SparseLongArray;
|
|
import kotlin.collections.IntIterator;
|
|
import kotlin.collections.LongIterator;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
|
|
@SourceDebugExtension({"SMAP\nSparseLongArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 SparseLongArray.kt\nandroidx/core/util/SparseLongArrayKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,100:1\n76#1,4:102\n1#2:101\n*S KotlinDebug\n*F\n+ 1 SparseLongArray.kt\nandroidx/core/util/SparseLongArrayKt\n*L\n72#1:102,4\n*E\n"})
|
|
/* loaded from: classes.dex */
|
|
public final class SparseLongArrayKt {
|
|
public static final int getSize(SparseLongArray sparseLongArray) {
|
|
return sparseLongArray.size();
|
|
}
|
|
|
|
public static final boolean contains(SparseLongArray sparseLongArray, int i) {
|
|
return sparseLongArray.indexOfKey(i) >= 0;
|
|
}
|
|
|
|
public static final void set(SparseLongArray sparseLongArray, int i, long j) {
|
|
sparseLongArray.put(i, j);
|
|
}
|
|
|
|
public static final SparseLongArray plus(SparseLongArray sparseLongArray, SparseLongArray sparseLongArray2) {
|
|
SparseLongArray sparseLongArray3 = new SparseLongArray(sparseLongArray.size() + sparseLongArray2.size());
|
|
putAll(sparseLongArray3, sparseLongArray);
|
|
putAll(sparseLongArray3, sparseLongArray2);
|
|
return sparseLongArray3;
|
|
}
|
|
|
|
public static final boolean containsKey(SparseLongArray sparseLongArray, int i) {
|
|
return sparseLongArray.indexOfKey(i) >= 0;
|
|
}
|
|
|
|
public static final boolean containsValue(SparseLongArray sparseLongArray, long j) {
|
|
return sparseLongArray.indexOfValue(j) >= 0;
|
|
}
|
|
|
|
public static final long getOrDefault(SparseLongArray sparseLongArray, int i, long j) {
|
|
return sparseLongArray.get(i, j);
|
|
}
|
|
|
|
public static final long getOrElse(SparseLongArray sparseLongArray, int i, Function0 function0) {
|
|
int indexOfKey = sparseLongArray.indexOfKey(i);
|
|
return indexOfKey >= 0 ? sparseLongArray.valueAt(indexOfKey) : ((Number) function0.invoke()).longValue();
|
|
}
|
|
|
|
public static final boolean isEmpty(SparseLongArray sparseLongArray) {
|
|
return sparseLongArray.size() == 0;
|
|
}
|
|
|
|
public static final boolean isNotEmpty(SparseLongArray sparseLongArray) {
|
|
return sparseLongArray.size() != 0;
|
|
}
|
|
|
|
public static final boolean remove(SparseLongArray sparseLongArray, int i, long j) {
|
|
int indexOfKey = sparseLongArray.indexOfKey(i);
|
|
if (indexOfKey < 0 || j != sparseLongArray.valueAt(indexOfKey)) {
|
|
return false;
|
|
}
|
|
sparseLongArray.removeAt(indexOfKey);
|
|
return true;
|
|
}
|
|
|
|
public static final void forEach(SparseLongArray sparseLongArray, Function2 function2) {
|
|
int size = sparseLongArray.size();
|
|
for (int i = 0; i < size; i++) {
|
|
function2.invoke(Integer.valueOf(sparseLongArray.keyAt(i)), Long.valueOf(sparseLongArray.valueAt(i)));
|
|
}
|
|
}
|
|
|
|
public static final void putAll(SparseLongArray sparseLongArray, SparseLongArray sparseLongArray2) {
|
|
int size = sparseLongArray2.size();
|
|
for (int i = 0; i < size; i++) {
|
|
sparseLongArray.put(sparseLongArray2.keyAt(i), sparseLongArray2.valueAt(i));
|
|
}
|
|
}
|
|
|
|
public static final IntIterator keyIterator(final SparseLongArray sparseLongArray) {
|
|
return new IntIterator() { // from class: androidx.core.util.SparseLongArrayKt$keyIterator$1
|
|
private int index;
|
|
|
|
public final int getIndex() {
|
|
return this.index;
|
|
}
|
|
|
|
public final void setIndex(int i) {
|
|
this.index = i;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
return this.index < sparseLongArray.size();
|
|
}
|
|
|
|
@Override // kotlin.collections.IntIterator
|
|
public int nextInt() {
|
|
SparseLongArray sparseLongArray2 = sparseLongArray;
|
|
int i = this.index;
|
|
this.index = i + 1;
|
|
return sparseLongArray2.keyAt(i);
|
|
}
|
|
};
|
|
}
|
|
|
|
public static final LongIterator valueIterator(final SparseLongArray sparseLongArray) {
|
|
return new LongIterator() { // from class: androidx.core.util.SparseLongArrayKt$valueIterator$1
|
|
private int index;
|
|
|
|
public final int getIndex() {
|
|
return this.index;
|
|
}
|
|
|
|
public final void setIndex(int i) {
|
|
this.index = i;
|
|
}
|
|
|
|
@Override // java.util.Iterator
|
|
public boolean hasNext() {
|
|
return this.index < sparseLongArray.size();
|
|
}
|
|
|
|
@Override // kotlin.collections.LongIterator
|
|
public long nextLong() {
|
|
SparseLongArray sparseLongArray2 = sparseLongArray;
|
|
int i = this.index;
|
|
this.index = i + 1;
|
|
return sparseLongArray2.valueAt(i);
|
|
}
|
|
};
|
|
}
|
|
}
|