added findbyname in locationlistmanager

This commit is contained in:
Sem van der Hoeven
2021-01-06 19:25:10 +01:00
parent aeb676e594
commit c2bf1d762a
4 changed files with 18 additions and 5 deletions

View File

@@ -33,4 +33,13 @@ public enum LocationListManager {
this.locationList = locationLoader.load();
}
public Location findByName(String name) {
Location res = null;
for (Location location : this.locationList) {
if (location.getName().equals(name)) res = location;
break;
}
return res;
}
}