package h;

import d.C0422b;
import g.C0474a;
import java.lang.reflect.Array;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.List;
import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public final class y extends l {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final int f4177c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private final List f4178d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private final C0474a f4179e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private final Object f4180f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private final Map f4181g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    private final Collection f4182h;

    public y(C0474a c0474a, List list, int i2) {
        super(null, null);
        this.f4179e = c0474a;
        this.f4177c = i2;
        this.f4178d = list;
        this.f4180f = null;
        this.f4181g = null;
        this.f4182h = null;
    }

    @Override // h.l
    public void c(C0474a c0474a, Object obj, Type type, Map map) {
    }

    @Override // h.l
    public void g(Object obj, Object obj2) {
        C0422b c0422b;
        Object objU;
        Map map = this.f4181g;
        if (map != null) {
            map.put(this.f4180f, obj2);
            return;
        }
        Collection collection = this.f4182h;
        if (collection != null) {
            collection.add(obj2);
            return;
        }
        this.f4178d.set(this.f4177c, obj2);
        List list = this.f4178d;
        if (!(list instanceof C0422b) || (objU = (c0422b = (C0422b) list).u()) == null || Array.getLength(objU) <= this.f4177c) {
            return;
        }
        if (c0422b.r() != null) {
            obj2 = l.l.h(obj2, c0422b.r(), this.f4179e.i());
        }
        Array.set(objU, this.f4177c, obj2);
    }

    public y(Map map, Object obj) {
        super(null, null);
        this.f4179e = null;
        this.f4177c = -1;
        this.f4178d = null;
        this.f4180f = obj;
        this.f4181g = map;
        this.f4182h = null;
    }

    public y(Collection collection) {
        super(null, null);
        this.f4179e = null;
        this.f4177c = -1;
        this.f4178d = null;
        this.f4180f = null;
        this.f4181g = null;
        this.f4182h = collection;
    }
}
