Clone List Elements in Java

Posted by Amir Rachum on Stack Overflow See other posts from Stack Overflow or by Amir Rachum
Published on 2010-04-25T19:21:53Z Indexed on 2010/04/25 19:33 UTC
Read the original article Hit count: 210

Filed under:
|
|
|

Hi all,

I have a variable of type List<RelationHeader>. Now I want to copy all the elements in this list to a new list, but I want to actually copy all the members by value (clone them). Is there a quick command to do this, or do I need to iterate over the list and copy them one at a time?

© Stack Overflow or respective owner

Related posts about java

Related posts about linked-list