package com.tencent.mm.plugin.sns.ui;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.platformtools.bo;
import com.tencent.ytcommon.BuildConfig;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

class ag$b {
    final /* synthetic */ ag rlW;
    ArrayList<String> rma = new ArrayList();
    Map<String, Boolean> rmb = new HashMap();
    Map<String, Integer> rmc = new HashMap();

    ag$b(ag agVar) {
        this.rlW = agVar;
        AppMethodBeat.i(38488);
        AppMethodBeat.o(38488);
    }

    public final ag$b q(String str, int i, boolean z) {
        AppMethodBeat.i(38489);
        this.rma.add(str);
        this.rmc.put(str, Integer.valueOf(i));
        this.rmb.put(str, Boolean.valueOf(z));
        AppMethodBeat.o(38489);
        return this;
    }

    public final void S(ArrayList<String> arrayList) {
        AppMethodBeat.i(38490);
        this.rmb.clear();
        if (arrayList == null) {
            this.rma = new ArrayList();
            AppMethodBeat.o(38490);
            return;
        }
        this.rma = arrayList;
        Iterator it = arrayList.iterator();
        while (it.hasNext()) {
            this.rmb.put((String) it.next(), Boolean.FALSE);
        }
        AppMethodBeat.o(38490);
    }

    public final String toString() {
        AppMethodBeat.i(38491);
        String str = BuildConfig.FLAVOR;
        Iterator it = this.rma.iterator();
        while (true) {
            String str2 = str;
            if (it.hasNext()) {
                str = (String) it.next();
                int i = 0;
                if (this.rmc != null) {
                    i = ((Integer) this.rmc.get(str)).intValue();
                }
                str = str2 + str + "," + i + ";";
            } else {
                AppMethodBeat.o(38491);
                return str2;
            }
        }
    }

    public final ag$b ZC(String str) {
        AppMethodBeat.i(38492);
        try {
            for (String split : str.split(";")) {
                String[] split2 = split.split(",");
                this.rma.add(split2[0]);
                this.rmc.put(split2[0], Integer.valueOf(bo.getInt(split2[1], 0)));
            }
        } catch (Exception e) {
        }
        AppMethodBeat.o(38492);
        return this;
    }
}
