Java Utililty Methods List Shuffle

List of utility methods to do List Shuffle

Description

The list of methods to do List Shuffle are organized into topic(s).

Method

voidshuffle(List list)
shuffle
Collections.shuffle(list);
Listshuffle(List list, int count)
shuffle
List<Integer> listClone = new ArrayList<>();
for (int i = 0; i < list.size(); ++i) {
    listClone.add(i);
if (list.size() == count) {
    return listClone;
Collections.shuffle(listClone);
...
Listshuffle(List list)
shuffle
List<T> copy = new ArrayList<T>(list);
Collections.shuffle(copy);
return copy;
ListShuffleList(final Collection list)
Shuffle List
final ArrayList result = new ArrayList(list);
Collections.shuffle(result);
return result;