public <T> List<T> reorder( List<T> sequence)
    {
    int elementCount = sequence.size();
    if( elementCount > 1)
      {
      List<T> elements = new ArrayList<T>( sequence);
      sequence.clear();

      for( ; elementCount > 0; elementCount--)
        {
        sequence.add( elements.remove( generator_.nextInt( elementCount)));
        }
      }

    return sequence;
    }
public < T > List < T > reorder ( List < T > sequence ) { int elementCount = sequence . size ( ) ; if ( elementCount > 1 ) { List < T > elements = new ArrayList < T > ( sequence ) ; sequence . clear ( ) ; for ( ; elementCount > 0 ; elementCount -- ) { sequence . add ( elements . remove ( generator_ . nextInt ( elementCount ) ) ) ; } } return sequence ; }
Returns the given list with its elements rearranged in a random order.