I have such code:
HashMap<Long, TempPosition> positions = getTempPositions();
for (SortedMap.Entry<Long, TempPosition> p: positions.entrySet()) {...}
The problem is the 'positions' is not sorted or non valid sorted. What the easiest way to iterate through the hashmap and save its current order?
Thank you