29 lines
644 B
Java
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();
|
|
}
|
|
}
|