perchè
Map<String, Integer> map = new HashMap();

non è meglio
Map<Integer, Integer>

???