Say I have a class Foo(val a: String, val b: Int, val c: Date) and I want to sort a list of Foos based on all three properties. How would I go abou
class Foo(val a: String, val b: Int, val c: Date)
Foo
If you need sort by multiple fields, and some field by descending and others by ascending you could use:
YOUR_MUTABLE_LIST.sortedWith(compareBy { it.PARAM_1}.thenByDescending { it.PARAM_2}.thenBy { it.PARAM_3})