mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 05:23:51 +00:00
Fixed ordering of fleets by name to use NaturalComparator
This commit is contained in:
1 parent
fa3bcd39ff
commit
47185ef08d
1 file changed
+2
-1
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.sap.sailing.gwt.ui.shared.race;
|
||||
|
||||
import com.google.gwt.user.client.rpc.IsSerializable;
|
||||
import com.sap.sse.common.util.NaturalComparator;
|
||||
|
||||
public class FleetMetadataDTO implements IsSerializable, Comparable<FleetMetadataDTO> {
|
||||
|
||||
@@ -35,7 +36,7 @@ public class FleetMetadataDTO implements IsSerializable, Comparable<FleetMetadat
|
||||
@Override
|
||||
public int compareTo(FleetMetadataDTO o) {
|
||||
if(ordering == o.ordering) {
|
||||
return fleetName.compareTo(o.fleetName);
|
||||
return new NaturalComparator().compare(this.fleetName, o.fleetName);
|
||||
}
|
||||
return Integer.compare(ordering, o.ordering);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user