Advertisement
AlessandroG

Untitled

Jun 1st, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1.     public Map<Colore, List<Forma>> colore2forme() {
  2.         Map<Colore, List<Forma>> colore2forme = new HashMap<>();
  3.         List<Forma> tmp= null;
  4.         for(List<Forma> forme : this.livello2forma.values()){
  5.             for(Forma forma : forme){
  6.                 tmp=colore2forme.get(forma);
  7.                 if(tmp==null)
  8.                     tmp=new ArrayList<>();
  9.                 tmp.add(forma);
  10.                 colore2forme.put(forma.getColore(), tmp);
  11.             }
  12.         }
  13.         return colore2forme;
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement