Open jukecraft opened 8 years ago
Would it make more sense to preserve either insertion order or accepting
construction order?
I'm not sure what you mean. My example is that I load a forecast
(consisting of date
and expectedValue
) from the database and put it in a list, then transform it to the rekord object and return it in an API response. The forecasts
should be sorted by date
.
I currently use a Forecast
object that overrides compareTo
using the date
, but I'd like to replace that with a rekord.
Ah, I see, makes sense. It would probably make sense to wrap it in a ComparableRekord
. Will think about it.
It would be lovely to have the ability to specify which fields to use when sorting rekords - basically implementing the Comparable interface