I have created a function to transform the elements of a list:
private List<Hostel> build(List<Hotel> hotels) {
         return hotels.stream().map(h -> convert(h)).collect(toList());
    }
but I have a compilation error:
required type: List<Hostel>
Provided: List<List<Hostel>>
 
    