Initial commit
This commit is contained in:
28
sources/androidx/lifecycle/ViewModelStore.java
Normal file
28
sources/androidx/lifecycle/ViewModelStore.java
Normal file
@@ -0,0 +1,28 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user