Files
jimu-decompiled/sources/androidx/lifecycle/ViewModelStore.java
2025-05-13 19:24:51 +02:00

29 lines
644 B
Java

package androidx.lifecycle;
import java.util.HashMap;
import java.util.Iterator;
/* loaded from: classes.dex */
public class ViewModelStore {
private final HashMap<String, ViewModel> a = new HashMap<>();
final void a(String str, ViewModel viewModel) {
ViewModel put = this.a.put(str, viewModel);
if (put != null) {
put.a();
}
}
final ViewModel a(String str) {
return this.a.get(str);
}
public final void a() {
Iterator<ViewModel> it = this.a.values().iterator();
while (it.hasNext()) {
it.next().a();
}
this.a.clear();
}
}