- 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
44 lines
1.2 KiB
Java
44 lines
1.2 KiB
Java
package androidx.lifecycle;
|
|
|
|
import androidx.annotation.RestrictTo;
|
|
import java.util.HashSet;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ViewModelStore {
|
|
private final Map<String, ViewModel> map = new LinkedHashMap();
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
public final void put(String key, ViewModel viewModel) {
|
|
Intrinsics.checkNotNullParameter(key, "key");
|
|
Intrinsics.checkNotNullParameter(viewModel, "viewModel");
|
|
ViewModel put = this.map.put(key, viewModel);
|
|
if (put != null) {
|
|
put.onCleared();
|
|
}
|
|
}
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
public final ViewModel get(String key) {
|
|
Intrinsics.checkNotNullParameter(key, "key");
|
|
return this.map.get(key);
|
|
}
|
|
|
|
@RestrictTo({RestrictTo.Scope.LIBRARY_GROUP})
|
|
public final Set<String> keys() {
|
|
return new HashSet(this.map.keySet());
|
|
}
|
|
|
|
public final void clear() {
|
|
Iterator<ViewModel> it = this.map.values().iterator();
|
|
while (it.hasNext()) {
|
|
it.next().clear();
|
|
}
|
|
this.map.clear();
|
|
}
|
|
}
|