Verwenden Sie dieses Tag für Fragen zu Java 8, Version 8 (interne Nummer 1.8) der Java-Plattform, die am 18. März 2014 veröffentlicht wurde. In den meisten Fällen sollten Sie auch das Java-Tag angeben.
Ich habe eine Liste mit Typen List<A>und mit der Kartenoperation eine kollektive Liste mit Typen List<B>für alle A-Elemente, die in einer Liste zusammengeführt sind. List<A> listofA = [A1, A2, A3, A4, A5, ...] List<B> listofB = listofA.stream() .map(a -> repo.getListofB(a)) .flatMap(Collection::stream) .collect(Collectors.toList()); ohne flatmap List<List<B>> listOflistofB = listofA.stream() .map(a -> …
We use cookies and other tracking technologies to improve your browsing experience on our website,
to show you personalized content and targeted ads, to analyze our website traffic,
and to understand where our visitors are coming from.
By continuing, you consent to our use of cookies and other tracking technologies and
affirm you're at least 16 years old or have consent from a parent or guardian.