Collection, and therefore also List, has a method called addAll to add all elements of any other collection in one go. For List, addAll will add all those elements at the end. So just create a new List, and call addAll for all Lists whose contents need to be added.
. . . and Lists retain insertion order as a default behaviour. You would have to look in the documentation for addAll to see which order it adds in. It says in the Java™ Tutorials that addAll concatenates Lists.
Amit K Jain
Joined: Nov 06, 2008
Ahh! It was so quick and easy.
Thank you all
Joined: Oct 13, 2005
You spend hours and hours designing the List classes, and once you have got them working, they become really easy to use.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: How to add multple lists in one list in insertion order