Java Random randomUniformUniqueIntegerList(int sz)

Here you can find the source of randomUniformUniqueIntegerList(int sz)

Description

random Uniform Unique Integer List

License

Open Source License

Declaration

public static List<Integer> randomUniformUniqueIntegerList(int sz) 

Method Source Code


//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;
    }
}

Related

  1. randomSleep()
  2. randomStateAbbr()
  3. randomStr(Random rnd, int size)
  4. randomSubList(List list, int sizeOfSubList)
  5. randomSuccess()
  6. randomValue()
  7. randomValue(T[] array)
  8. randomVector(int size)
  9. randRandom(Random random)