Fix sorting undefined
This commit is contained in:
parent
eb8e7dedc1
commit
c73f5f8220
1 changed files with 6 additions and 0 deletions
|
@ -269,6 +269,12 @@ public class RouteStatisticsHelper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(String o1, String o2) {
|
public int compare(String o1, String o2) {
|
||||||
|
if (o1.equalsIgnoreCase(UNDEFINED_ATTR)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (o2.equalsIgnoreCase(UNDEFINED_ATTR)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
return -Float.compare(partition.get(o1).getDistance(), partition.get(o2).getDistance());
|
return -Float.compare(partition.get(o1).getDistance(), partition.get(o2).getDistance());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue