package com.gem.media.ad;


import android.text.TextUtils;


import com.gem.media.InitA;

import java.util.HashMap;

public class CpAdData {

    private static final class CpAdDataHolder {
        static final CpAdData adManager = new CpAdData();
    }

    public static CpAdData getInstance() {
        return CpAdDataHolder.adManager;
    }

    private HashMap<String, AdData> adDataHashMap;

    public static final String CP_ADMOB = "admob";

    public void setCpData(String cp, AdData adData) {
        if (null == adDataHashMap) {
            adDataHashMap = new HashMap<>();
        }
        adDataHashMap.put(cp, adData);
    }

    public AdData getAdData(String cpId) {
        if (adDataHashMap == null) {
            adDataHashMap = new HashMap<>();
            return null;
        }
        return adDataHashMap.get(cpId);
    }
}
