I have a list of objects I need to sort according to properties of one of their fields. I\'ve heard that SortedMap and Comparators are the best way to do this.
Since you have a list and get an error because you have one argument on the map I suppose you want a sorted set:
SortedSet set = new TreeSet(comparator);
This will keep the set sorted, i.e. an iterator will return the elements in their sort order. There are also methods specific to SortedSet which you might want to use. If you also want to go backwards you can use NavigableSet.