package com.bytedance.android.live.rank.impl.list.controller.base;

import X.6Is;
import X.AnonymousClass0CB;
import X.AnonymousClass0CH;
import X.C09630aP;
import X.M12;
import com.bytedance.android.live.rank.impl.list.controller.base.BaseRankController;
import com.bytedance.android.live.rank.impl.list.vm.RankRootViewModel;
import com.bytedance.android.livesdk.rank.list.model.RankListV2Response;
import com.bytedance.covode.number.Covode;
import java.util.Map;

public abstract class IChildController<PARENTC extends BaseRankController> extends BaseRankController implements 6Is {
    public final PARENTC LIZ;

    static {
        Covode.recordClassIndex(10270);
    }

    public abstract void LIZ(int i, RankListV2Response.RankInfo rankInfo, RankListV2Response.RankView rankView);

    public void onStateChanged(AnonymousClass0CH r1, AnonymousClass0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final RankRootViewModel LIZIZ() {
        return this.LIZ.LIZIZ();
    }

    public IChildController(PARENTC parentc) {
        M12.LIZ(parentc);
        this.LIZ = parentc;
    }

    public void LIZ(boolean z) {
        for (Map.Entry<Integer, IChildController<?>> value : this.LIZJ.entrySet()) {
            ((IChildController) value.getValue()).LIZ(z);
        }
    }

    public final void LIZ(int i, IChildController<?> iChildController) {
        M12.LIZ(iChildController);
        if (this.LIZ.LIZJ.put(Integer.valueOf(i), iChildController) != null) {
            C09630aP.LIZ(6, "IChildController", "registerToParentC " + i + " error");
        }
    }

    public final void LIZIZ(int i, IChildController<?> iChildController) {
        M12.LIZ(iChildController);
        if (this.LIZ.LIZJ.remove(Integer.valueOf(i)) == null) {
            C09630aP.LIZ(6, "IChildController", "unregisterFromParentC " + i + " error");
        }
    }
}
