}
public Map<String, P2jCounters> buildCountersMap(Counters counters) {
Map<String, P2jCounters> cMap = Maps.newHashMap();
for (Group g : counters) {
P2jCounters countersObj = new P2jCounters();
cMap.put(g.getDisplayName(), countersObj);
for (Counter c : g) {
countersObj.getCounters().put(c.getDisplayName(), c.getValue());
}
}
return cMap;
}