Hi Guys, I have to sort an item of Custom object. ...
# android
s
Hi Guys, I have to sort an item of Custom object. Its values like :
9 A - 11 -  9 - 11 B
how can I make it to be
9 - 9 A - 11 - 11 B
I want to make with code below but I am could not afford it. The trouble is sorting array items with number aware format.
Copy code
//result is list 
//'it' is CustomObject its name is DoorItem. Obejcts properties are id, name, doorNumber
result.sortedWith(compareBy {it.doorNumber})