@ Universal public static < V > List < V > deepCopy ( List < V > list ) { if ( list instanceof LinkedList ) { return deepCopyToList ( list , new LinkedList < V > ( ) ) ; } else if ( list instanceof CopyOnWriteArrayList ) { return deepCopyToList ( list , new CopyOnWriteArrayList < V > ( ) ) ; } else { return deepCopy ( ( Collection ) list ) ; } }
Clones each list item into a new instance with copied fields . It is like doing a clone operation .