Is there any built in option to tell a Map.toSorte...
# android
p
Is there any built in option to tell a Map.toSortedMap{} that it must invert current order? I mean, if it's ascending, to put it descending, and if it's descending, to put it ascending. If not, the only way I can imagine is to keep a variable with the current order, but I'm trying to avoid it
🚫 1
🤔 1
j
you can probably create a
TreeMap
manually and put a
Comparator
that inverts the order