List of utility methods to do List Shuffle
void | shuffle(List> list) shuffle Collections.shuffle(list); |
List | shuffle(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); ... |
List | shuffle(List shuffle List<T> copy = new ArrayList<T>(list); Collections.shuffle(copy); return copy; |
List | ShuffleList(final Collection list) Shuffle List final ArrayList result = new ArrayList(list); Collections.shuffle(result); return result; |