package com.ss.android.ugc.aweme.ecommerce.libtrack.api.data;

import X.M12;
import com.bytedance.covode.number.Covode;
import java.io.Serializable;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import kotlin.h.b.n;
import org.json.JSONException;
import org.json.JSONObject;

public class LaneParams extends HashMap<String, Object> implements Serializable {
    static {
        Covode.recordClassIndex(70187);
    }

    public final Set<Map.Entry<String, Object>> entrySet() {
        return getEntries();
    }

    public Set getEntries() {
        return super.entrySet();
    }

    public Set getKeys() {
        return super.keySet();
    }

    public int getSize() {
        return super.size();
    }

    public Collection getValues() {
        return super.values();
    }

    public final Set<String> keySet() {
        return getKeys();
    }

    public final int size() {
        return getSize();
    }

    public final Collection<Object> values() {
        return getValues();
    }

    public final JSONObject toJSONObject() {
        if (isEmpty()) {
            return null;
        }
        return new JSONObject(this);
    }

    public /* bridge */ boolean containsKey(String str) {
        return super.containsKey(str);
    }

    public /* bridge */ Object get(String str) {
        return super.get(str);
    }

    public /* bridge */ Object remove(String str) {
        return super.remove(str);
    }

    public final /* bridge */ boolean containsKey(Object obj) {
        if (!(obj instanceof String)) {
            return false;
        }
        return containsKey((String) obj);
    }

    public final /* bridge */ Object get(Object obj) {
        if (!(obj instanceof String)) {
            return null;
        }
        return get((String) obj);
    }

    public final /* bridge */ Object remove(Object obj) {
        if (!(obj instanceof String)) {
            return null;
        }
        return remove((String) obj);
    }

    public final LaneParams merge(JSONObject jSONObject) {
        if (jSONObject != null) {
            try {
                if (jSONObject.length() > 0) {
                    Iterator<String> keys = jSONObject.keys();
                    n.LIZIZ(keys, "");
                    while (keys.hasNext()) {
                        String next = keys.next();
                        if (next != null) {
                            put(next, jSONObject.get(next).toString());
                        } else {
                            throw new NullPointerException("null cannot be cast to non-null type kotlin.String");
                        }
                    }
                }
            } catch (JSONException unused) {
            }
        }
        return this;
    }

    public final int compareTo(LaneParams laneParams, Map<String, ? extends Object> map) {
        M12.LIZ(laneParams, map);
        putAll(map);
        return 0;
    }

    public /* bridge */ Object getOrDefault(String str, Object obj) {
        return super.getOrDefault(str, obj);
    }

    public final void plusAssign(String str, Object obj) {
        M12.LIZ(str);
        put(str, obj);
    }

    public final /* bridge */ Object getOrDefault(Object obj, Object obj2) {
        if (!(obj instanceof String)) {
            return obj2;
        }
        return getOrDefault((String) obj, obj2);
    }

    public final /* bridge */ boolean remove(Object obj, Object obj2) {
        if (!(obj instanceof String)) {
            return false;
        }
        return remove((String) obj, obj2);
    }

    public /* bridge */ boolean remove(String str, Object obj) {
        return super.remove(str, obj);
    }
}
