Quote:
Originally Posted by pblankenbaker
When sorting objects with the Collections.sort() method, you will typically want to supply the "comparator" parameter that lets you control the comparison between each object (decide which should come before the other).
For example, if you want to sort by area, I think you can use a static helper method something like the following:
Hope that helps
|
Terrific. We were heading in that direction but couldn't get the eclipse to accept our code.
We were just trying to call the Collections.sort in-line.
Your static method went in with no problems.
I'll have to investigate further to understand why the static method worked, but the inline code didn't.
Thanks again for the detailed response.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org
FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor