From 13a13dca637d8813d04080994a069fed6eba4f43 Mon Sep 17 00:00:00 2001 From: Merlin Unterfinger Date: Fri, 13 Sep 2024 16:57:52 +0200 Subject: [PATCH] ENH: NAV-180 - Sort get stops like term according to name --- .../java/ch/naviqore/service/gtfs/raptor/GtfsRaptorService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ch/naviqore/service/gtfs/raptor/GtfsRaptorService.java b/src/main/java/ch/naviqore/service/gtfs/raptor/GtfsRaptorService.java index a48f7d07..71c9e742 100644 --- a/src/main/java/ch/naviqore/service/gtfs/raptor/GtfsRaptorService.java +++ b/src/main/java/ch/naviqore/service/gtfs/raptor/GtfsRaptorService.java @@ -79,6 +79,7 @@ public boolean hasTravelModeInformation() { public List getStops(String like, SearchType searchType) { return stopSearchIndex.search(like.toLowerCase(), TypeMapper.map(searchType)) .stream() + .sorted(Comparator.comparing(ch.naviqore.gtfs.schedule.model.Stop::getName)) .map(TypeMapper::map) .toList(); }