Here you can find the source of randomUniformUniqueIntegerList(int sz)
public static List<Integer> randomUniformUniqueIntegerList(int sz)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static List<Integer> randomUniformUniqueIntegerList(int sz) { List<Integer> lst = new ArrayList<>(sz); for (int i = 0; i < sz; i++) lst.add(i);/*from www .j a v a2 s .co m*/ Collections.shuffle(lst); return lst; } }