If you need to add all the values in a Map, try this:
float sum = 0.0f;
for (float f : map.values()) {
sum += f;
}
At the end, the sum variable will contain the answer. So yes, for traversing a Map‘s values it’s best to use a for loop.