public Map<Long, Integer> getTopInfratores() { List<Infracao> listaInf = new ArrayList<Infracao>(getInfracoes()); Iterator<Infracao> ite = listaInf.iterator(); Map<Long, Integer> infConds = new HashMap<Long, Integer>(); Condutor c; int cont = 0; while (ite.hasNext()) { c = banco.getCondutorComCpf(getVeiculoComPlaca(ite.next().getPlaca()).getCpfDono()); cont = 1; if (infConds.get(c.getCPF()) != null) { cont = (infConds.get(c.getCPF()) + 1); } infConds.put(c.getCPF(), cont); } return MapUtil.ordenePorValor(infConds); }