Here you can find the source of getRandomIdxList(int minIdx, int maxIdx)
Parameter | Description |
---|---|
minIdx | a parameter |
maxIdx | a parameter |
public static List<Integer> getRandomIdxList(int minIdx, int maxIdx)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**//from w ww .jav a2 s . c o m * * @param minIdx * @param maxIdx * @return */ public static List<Integer> getRandomIdxList(int minIdx, int maxIdx) { List<Integer> randomIdxList = new ArrayList<Integer>(); for (int i = minIdx; i <= maxIdx; i++) randomIdxList.add(i); return randomIdxList; } /** * * @param maxIdx * @return */ public static List<Integer> getRandomIdxList(int maxIdx) { return getRandomIdxList(0, maxIdx); } }