By nature Maps are "Unordered/Unsorted" collections, if you need something like that there's other methods you can use, like SparseArray(which is better suited for int/value elements), you could create a list of your int keys, sort it, and then iterating through them getting the values as follows:
//This would be your SparseArray
{12,"apple"}
{1,"grape"}
{23,"pineapple"}
{2,"pear"}
{16,"cherry"}
int[] sortedInt = {1,2, 12, 16, 23};//Previously sorted values using any Java sorting functionality
for(int i = 0 ; i < sortedInt.length; i++){
String value = yourSparseArrat.get(sortedInt[i]);
}
And there you go, by sorting your keys and then getting the values in that order you get what you need.
Regards!