I think flatMap() is what you're looking for.

For example:

 List<AClass> allTheObjects = map.values()
         .stream()
         .flatMap(listContainer -> listContainer.lst.stream())
         .collect(Collectors.toList());
Answer from Puce on Stack Overflow
🌐
Davidvlijmincx
davidvlijmincx.com › home › java › java stream join lists
Java Stream join lists
March 10, 2022 - The easiest way to join two lists with Streams is by using the Stream.concat(Stream a, Stream b) method. The method takes two Stream instances as parameters and puts the second Stream behind the first Stream.
🌐
Medium
buddhiprabhath.medium.com › java-8-streams-flatmap-to-join-list-of-lists-30245a5e31a1
Java 8 streams - flatMap to join list of lists | by Buddhi Prabhath | Medium
September 18, 2020 - We can use flatMap method to join list of lists, as flatMap helps to join streams. let’s say we have a List<List<T>>, and we want to join all the List<T> inside the parent list together as a single list as a List<T>. ... import java.util....
🌐
Techie Delight
techiedelight.com › home › java › join two lists in java
Join two lists in Java | Techie Delight
July 7, 2026 - This method is similar to List.addAll() but likely to run significantly faster. We can also use Java 8 Stream to join two lists. ⮚ Using Stream.of() with flatMap() + Collector · Here we’re obtaining a stream consisting of elements from both the list using the static factory method Stream.of() and accumulating all elements into a new list using a Collector.
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-8-streams-collectors-joining-method-with-examples
Java 8 Streams | Collectors.joining() method with Examples - GeeksforGeeks
January 22, 2026 - Collectors.joining() concatenates all stream elements into a single String. The resulting concatenated string is stored in chString. Example 2: Using joining() with a List of Characters ... import java.util.Arrays; import java.util.List; import ...
🌐
Baeldung
baeldung.com › home › java › java collections › java – combine multiple collections
Java - Combine Multiple Collections | Baeldung
May 11, 2024 - The Stream interface in Java API provides useful methods that make it easier to process collections.
🌐
Vultr Docs
docs.vultr.com › java › examples › join two lists
Java Program to Join Two Lists
December 16, 2024 - Ensure you have two lists to combine. Use Stream.concat() from Java 8 to merge the streams of both lists, then collect results into a new list.
🌐
Medium
medium.com › javarevisited › nuanced-string-joining-in-java-7db547c331d0
Nuanced String Joining in Java | Javarevisited
April 23, 2024 - I wrote an article for 97 Things ... through some example Java code using Collectors.joining() and String.join() to create a comma separated list of names....
Find elsewhere
🌐
Benchresources
benchresources.net › home › java › java 8 – how to merge/concatenate/join two lists into single list ?
Java 8 - How to merge/concatenate/join two lists into single list ? - BenchResources.Net
July 19, 2022 - Previously we have seen an example to join or concatenate two or more Arrays into single Arrays ... package in.bench.resources.java8.merge.list; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; public class MergeListUsingStreamConcat { public static void main(String[] args) { // list 1 - fruits List<String> fruits = Arrays.asList( "Apple", "Mango", "Grape", "Cherry", "Melon" ); System.out.println("Fruit List :- \n" + fruits); // list 2 - vegetables List<String> veggies = Arrays.asList( "Carrot", "Radish", "Lettuce", "Bean", "Gourd" ); System.out.println("\nVeggies List :- \n" + veggies); // Merging 2 lists List<String> mergedList = Stream .concat(fruits.stream(), veggies.stream()) .collect(Collectors.toList()); // print merged list to the console System.out.println("\nMerged List :- \n" + mergedList); } }
🌐
Javaprogramto
javaprogramto.com › 2020 › 11 › java-join-two-lists.html
How To Join Two Or Combine More Lists In old and new Java 8 Steam API? JavaProgramTo.com
November 15, 2020 - A quick and programming guide to join or combine two lists in java in different ways using addAll() and java 8 stream api with examples.
🌐
ConcretePage
concretepage.com › java › jdk-8 › java-8-concat-streams-lists-sets-arrays-example
Java 8 Concat Streams, Lists, Sets, Arrays Example
Stream provides concat() method to concatenate two streams and will return a stream. To concatenate Lists, Sets and Arrays we will convert them into stream first and using concat() we will combine them.
🌐
How to do in Java
howtodoinjava.com › home › collections framework › java arraylist › how to merge two arraylists in java
How to Merge Two ArrayLists in Java
January 19, 2023 - ArrayList<String> listOne = new ArrayList<>(Arrays.asList("a", "b", "c")); ArrayList<String> listTwo = new ArrayList<>(Arrays.asList("c", "d", "e")); List<String> combinedList = Stream.of(listOne, listTwo) .flatMap(x -> x.stream()) .collect(Collectors.toList()); System.out.println(combinedList); Program output. ... In these examples, we combined the lists, but in the final list, we had duplicate elements. This may not be the desired output in many cases. Next, we will learn to merge the lists, excluding duplicates. To get a merged list minus duplicate elements, we have two approaches: The Java Sets allow only unique elements.
🌐
Coderwall
coderwall.com › p › im4lja › joining-objects-into-a-string-with-java-8-stream-api
Joining Objects into a String with Java 8 Stream API (Example)
July 17, 2023 - #join · #stream · You can leverage Java 8 Collectors to concatenate some objects into a string separated by a delimiter: For example: List<Integer> numbers = Arrays.asList( 4, 8, 15, 16, 23, 42 ); return numbers.stream() .map( n -> n.toString() ) .collect( Collectors.joining( "," ) ); will return "4,8,15,16,23,42".
🌐
Java Development Journal
javadevjournal.com › home › how to join multiple lists in java
How to Join Multiple Lists in Java | Java Development Journal
October 23, 2020 - In this short post, we will learn how to join multiple lists in Java. We will be covering how to do this in Java 8, Java 7 and how we can use Apache Common API to join these lists. Java 8 Stream API provides a couple of different options to join multiple lists.
🌐
Educative
educative.io › answers › how-to-merge-two-lists-in-java
How to merge two lists in Java
In this shot, we have seen how to merge two lists in Java by using the addAll() method and Java Stream.
🌐
Scaler
scaler.com › home › topics › java program to merge two lists
Java Program to Merge Two Lists | Scaler Topics
June 9, 2024 - stream class in java can be used for merging two lists, it accepts two streams as arguments and joins them together to form a new stream.
🌐
Baeldung
baeldung.com › home › java › java streams › merging streams in java
Merging Streams in Java | Baeldung
June 24, 2026 - Since it is an instance method, we can easily chain it and append multiple streams. Note that we could also create a List out of the stream by using toList() if we type the resultingStream variable to the StreamEx type.
🌐
Medium
medium.com › @AlexanderObregon › javas-collectors-joining-method-explained-a4adb120b785
Java’s Collectors.joining() Method Explained | Medium
November 2, 2024 - Another common use case for Collectors.joining() is building file paths from a list of directory names or file segments. Instead of manually stitching together strings with slashes or other separators, you can use this method to create the path ...
🌐
verytools
verytools.net › xtools-guide › en › posts › collections-utils
How to join two lists by property in java
October 23, 2023 - One to one join is easy, one two many join is no much harder, let's implement it. // if the relationship between user and order is one to many, we can map user id to orders using java stream Map<Integer, List<Order>> userId2OrdersMap = orders.stream().collect(Collectors.groupingBy(Order::getUserId)); for (User user : users) { int userId = user.getId(); // for each user, we can get the related orders by user id List<Order> orders = userId2OrdersMap.get(userId); }