I am not 100% sure what you are after. If you are wanting sort by x and then y, you just want something like this:
sorttest.sort{ a, b -> a.x == b.x ? a.y <=> b.y : a.x <=> b.x } sorttest.sort{ a, b -> a.x == b.x ? b.y <=> a.y : b.x <=> a.x } // reverse of above On Mon, May 20, 2024 at 6:43 AM M.v.Gulik <mvgu...@gmail.com> wrote: > > Hmm. Same deal with Float values. > > (Guess I'm down to enforce BigDecimal values in case of sorting with > Float or Double values.)