package androidx.lifecycle;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

/* JADX INFO: compiled from: ViewModelStore.java */
/* JADX INFO: loaded from: classes.dex */
public class y {
    private final HashMap<String, v> a = new HashMap<>();

    public final void a() {
        Iterator<v> it = this.a.values().iterator();
        while (it.hasNext()) {
            it.next().a();
        }
        this.a.clear();
    }

    final v b(String str) {
        return this.a.get(str);
    }

    Set<String> c() {
        return new HashSet(this.a.keySet());
    }

    final void d(String str, v vVar) {
        v vVarPut = this.a.put(str, vVar);
        if (vVarPut != null) {
            vVarPut.d();
        }
    }
}
