- Timestamp:
- 2021-01-03T23:41:13+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/dialogs/changeset/ChangesetCacheTableRowSorter.java
r16826 r17435 2 2 package org.openstreetmap.josm.gui.dialogs.changeset; 3 3 4 import java.util.Comparator; 4 import static java.util.Comparator.comparing; 5 import static java.util.Comparator.comparingInt; 6 import static java.util.Comparator.naturalOrder; 7 import static java.util.Comparator.nullsLast; 5 8 6 9 import javax.swing.table.TableRowSorter; … … 20 23 21 24 // column 0 - Id 22 setComparator(0, Comparator.comparingInt(Changeset::getId));25 setComparator(0, comparingInt(Changeset::getId)); 23 26 24 27 // column 1 - Upload comment 25 setComparator(1, Comparator.comparing(Changeset::getComment, AlphanumComparator.getInstance()));28 setComparator(1, comparing(Changeset::getComment, AlphanumComparator.getInstance())); 26 29 27 30 // column 2 - Open 28 setComparator(2, Comparator.comparing(Changeset::isOpen));31 setComparator(2, comparing(Changeset::isOpen)); 29 32 30 33 // column 3 - User 31 setComparator(3, Comparator.comparing(Changeset::getUser, Comparator.comparing(User::getName)));34 setComparator(3, comparing(Changeset::getUser, comparing(User::getName))); 32 35 33 36 // column 4 - Created at 34 setComparator(4, Comparator.comparing(Changeset::getCreatedAt));37 setComparator(4, comparing(Changeset::getCreatedAt)); 35 38 36 39 // column 5 - Closed at 37 setComparator(5, Comparator.comparing(Changeset::getClosedAt));40 setComparator(5, comparing(Changeset::getClosedAt, nullsLast(naturalOrder()))); 38 41 39 42 // column 6 - Changes 40 setComparator(6, Comparator.comparingInt(Changeset::getChangesCount));43 setComparator(6, comparingInt(Changeset::getChangesCount)); 41 44 42 45 // column 7 - Discussions 43 setComparator(7, Comparator.comparingInt(Changeset::getCommentsCount));46 setComparator(7, comparingInt(Changeset::getCommentsCount)); 44 47 } 45 48 }
Note:
See TracChangeset
for help on using the changeset viewer.