Raed Ghazal
val order = Status.values().asList() statuses .groupingBy { it } .eachCount() .toSortedMap { t, t2 -> order.indexOf(t) - order.indexOf(t2) }
Spoudel347
val order = Status.entries.toList() statuses .groupingBy { it } .eachCount() .map { it.key to it.value } .sortedBy { order.indexOf(it.first) }.toMap()
A modern programming language that makes developers happier.