Deprecate @Sort in favor of @SortNatural and @SortComparator

Description

This addresses the todo in Sort about the type checking on the comparator() attribute.

Environment

None

Activity

Show:
Steve Ebersole
April 10, 2013, 4:29 PM

Some other options:

  1. Re-purpose @Sort to simply define that we want the set/map to be sorted. A comparator to apply could be broken out into a separate annotation. @Comparator? @SortComparator? If that companion annotation was not present, @Sort would indicate a natural sort.

  2. Distinct annotations, as mentioned in subject. @NaturalSort and @ComparatorSort. Although Emmanuel mentioned that it might be better to use @SortNaturally and @SortByComparator because of auto-completion in Eclipse not supporting middle-matching the way IntelliJ does.

Personally I prefer the first approach:

Fixed

Assignee

Steve Ebersole

Reporter

Steve Ebersole

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major
Configure