I need to iterate through a TreeMap<Integer, T> map
from the end to beginning. How to do so?
I have tried the same thing as the answer in posted topic below:
new Comparator<Integer>() {
@Override
public int compare(Integer o1, Integer o2) {
return o2.intValue() - o1.intValue();
}
}
but this is not a solution, that's just reversing the order.