public static < E > void swap ( List < E > list1 , List < E > list2 , int index ) { TrivialSwap . swap ( list1 , index , list2 , index ) ; }
Swap all the elements of two lists at the same position . The run time of this method depends on the implementation of the lists since elements are removed and added in the lists .