question: private static Vector permuteList ( Vector arr , SecureRandom rand ) { Vector retval = new Vector ( ) ; Vector tmp = new Vector ( ) ; for ( int i = 0 ; i < arr . size ( ) ; i ++ ) { tmp . addElement ( arr . elementAt ( i ) ) ; } retval . addElement ( tmp . elementAt ( 0 ) ) ; tmp . removeElementAt ( 0 ) ; while ( tmp . size ( ) != 0 ) { retval . insertElementAt ( tmp . elementAt ( 0 ) , getInt ( rand , retval . size ( ) + 1 ) ) ; tmp . removeElementAt ( 0 ) ; } return retval ; }
target:  Generates a permuted ArrayList from the original one. The original List is not modified