LinkedHashMap is precisely what you’re looking for.
It is exactly like HashMap, except that when you iterate over it, it presents the items in the insertion order.
LinkedHashMap is precisely what you’re looking for.
It is exactly like HashMap, except that when you iterate over it, it presents the items in the insertion order.