File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 3
3
import java .util .List ;
4
4
5
5
import static java .util .Comparator .comparing ;
6
- import static travelator .Other .SOME_COMPLICATED_RESULT ;
7
6
import static travelator .Collections .sorted ;
7
+ import static travelator .Other .SOME_COMPLICATED_RESULT ;
8
8
import static travelator .Other .routesFor ;
9
9
import static travelator .Routes .getDepartsFrom ;
10
10
@@ -29,12 +29,15 @@ static List<Journey> longestJourneysIn(
29
29
30
30
public static List <List <Journey >> routesToShowFor (String itineraryId ) {
31
31
var routes = routesFor (itineraryId );
32
- removeUnbearableRoutes (routes );
32
+ routes = removeUnbearableRoutes (routes );
33
33
return routes ;
34
34
}
35
35
36
- private static void removeUnbearableRoutes (List <List <Journey >> routes ) {
36
+ private static List <List <Journey >> removeUnbearableRoutes
37
+ (List <List <Journey >> routes
38
+ ) {
37
39
routes .removeIf (route -> sufferScoreFor (route ) > 10 );
40
+ return routes ;
38
41
}
39
42
40
43
private static int sufferScore (
You can’t perform that action at this time.
0 commit comments