Well, let's see. ASH maps are built on top of Java TreeMaps. Java doc says this:
That's hopeful. What does TreeMap say?
OK, fine. I take it back. If all of the keys have the same data type (which will always be the case for ASH maps) - integers in this case - you will get the keys in "natural" order.
Never mind. Feel free to use either "for" or "foreach" as you choose.
The order of a map is defined as the order in which the iterators on the map's collection views return their elements. Some map implementations, like the TreeMap class, make specific guarantees as to their order; others, like the HashMap class, do not.
That's hopeful. What does TreeMap say?
This class guarantees that the map will be in ascending key order, sorted according to the natural order for the key's class (see Comparable), or by the comparator provided at creation time, depending on which constructor is used.
OK, fine. I take it back. If all of the keys have the same data type (which will always be the case for ASH maps) - integers in this case - you will get the keys in "natural" order.
Never mind. Feel free to use either "for" or "foreach" as you choose.