April 05
Prde. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Exemplo
n   // Make a List de all permutation groups above size threshold
n   List winners = new ArrayList();
n   for(Iterator i=m.values().iterator(); i.hasNext(); ) {
n     List l = (List)i.next();
n     if( l.size() >= minGroupSize) winners.add(l);
n   }
n
n   // Sort permutation groups according to size
n   Collections.sort(winners, new Comparator() {
n     public int compare(Object o1, Object o2) {
n      return ((List)o2).size() - ((List)o1).size(); }
n   });
n
n   // Print permutation groups
n   for (Iterator i=winners.iterator(); i.hasNext(); ) {
n     List l = (List)i.next();
n     System.out.println(l.size() + ": " + l);
n   }