if i have a `List<Tide>` where a `Tide` has ...
# android
l
if i have a
List<Tide>
where a
Tide
has a field
tide
that is of type
Float
, what is the best way to sort by the
tide
field? I tried
tides.sortedBy { it.tide }
but it throws a ClassNotFoundException
j
I guess you can try implementing comparable in Tide
it is weird the ClassNotFound
p
isn’t it removed by proguard or something? is Tide data class?
r
sortedBy needs a boolean expression doesn’t it
l
this worked
val sortedTides = tides.sortedBy { it.tide }
thanks for the help