I have a class Country that contains a List<City>, a class City contains a List<Street>, and a class Street contains a class Humanwith a unique ID. I can't understand where is my mistake. I know there are brackets missing somewhere, but I don't know where to put them.
Human finded = country.getCities()
.stream()
.map(cty-> cty.getStreets()
.stream()
.map(strt-> strt.getHumans()
.stream()
.filter(hmn-> hmn.getID().equals(wantedID))
.findFirst()
.orElse(null);