It's somewhat more efficient to iterate with for (Map.Entry<String, Long[]> entry : stats.entrySet()).