public static <T> void copy(final List<? extends T> src, final List<? super T> dest) {
        if (src.size() > dest.size()) {
            throw new IllegalArgumentException("Source does not fit in dest");
        }

        Collections.copy(dest, src);
    }
public static < T > void copy ( final List < ? extends T > src , final List < ? super T > dest ) { if ( src . size ( ) > dest . size ( ) ) { throw new IllegalArgumentException ( "Source does not fit in dest" ) ; } Collections . copy ( dest , src ) ; }
Copies all of the elements from one list into another.  After the
operation, the index of each copied element in the destination list
will be identical to its index in the source list.  The destination
list must be at least as long as the source list.  If it is longer, the
remaining elements in the destination list are unaffected. <p>

This method runs in linear time.
@param  src The source list.
@param  dest The destination list.
@throws IndexOutOfBoundsException if the destination list is too small
to contain the entire source List.
@throws UnsupportedOperationException if the destination list's
list-iterator does not support the <tt>set</tt> operation.

@see java.util.Collections#copy(List, List)