Why cast does not work in this case directly with
HashMap<String, Double> mapDouble = (HashMap<String, Integer>) mapInteger;
Is there an easier way than a loop ?
HashMap<String, Double> mapDouble;
for (Map.Entry<String,Integer> entry : mapInteger.entrySet()) {
mapDouble.put(entry.getKey(), new Double(entry.getValue()) );
}