@Override public Stat stat(Key key) { for (StatsProvider provider : providers) { Stat stat = provider.stat(key); if (stat != null) { return stat; } } return null; }
public void trackStats(Context context, String page, int stat, int statType, int sort) { if ((m_tracker != null) && m_bActive) { m_tracker.trackPageView( page + StatsProvider.getInstance(context).statToUrl(stat) + StatsProvider.getInstance(context).statTypeToUrl(statType) + "Sort" + sort); } }
@Override public Key[] keys() { Key[] keys = null; for (StatsProvider provider : providers) { Key[] providerKeys = provider.keys(); if (keys == null) { keys = providerKeys; } else { for (Key providerKey : providerKeys) { if (!arrayContains(keys, providerKey)) { keys = Arrays.copyOf(keys, keys.length + 1); keys[keys.length - 1] = providerKey; } } } } return keys; }