mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Fixed #4744
This commit is contained in:
parent
3c1961c846
commit
f8ec8e5ded
@ -30,10 +30,11 @@ public class GlobalTrainDisplayData {
|
||||
}
|
||||
|
||||
public static List<TrainDeparturePrediction> prepare(String filter, int maxLines) {
|
||||
String regex = filter.isBlank() ? filter : "\\Q" + filter.replace("*", "\\E.*\\Q") + "\\E";
|
||||
return statusByDestination.entrySet()
|
||||
.stream()
|
||||
.filter(e -> e.getKey()
|
||||
.matches(filter.replace("*", ".*")))
|
||||
.matches(regex))
|
||||
.flatMap(e -> e.getValue()
|
||||
.stream())
|
||||
.sorted()
|
||||
|
Loading…
Reference in New Issue
Block a user