Use LinkedHashMap if map is iterated over

Iterating over HashMaps is not deterministic.