@Test public void testSampleIndex_NonRepeating() { IntSeries sample = Sampler.sampleIndex(50, 100, new SecureRandom()); Set<Integer> seen = new HashSet<>(); for (int i = 0; i < sample.size(); i++) { boolean repeated = !seen.add(i); assertFalse(repeated, i + " is present at least twice"); } }
public static IntSeries sampleIndex(int sampleSize, int originalSize) { return sampleIndex(sampleSize, originalSize, defaultRandom); }
Sampler { public static IntSeries sampleIndex(int sampleSize, int originalSize) { return sampleIndex(sampleSize, originalSize, defaultRandom); } }
Sampler { public static IntSeries sampleIndex(int sampleSize, int originalSize) { return sampleIndex(sampleSize, originalSize, defaultRandom); }  }
Sampler { public static IntSeries sampleIndex(int sampleSize, int originalSize) { return sampleIndex(sampleSize, originalSize, defaultRandom); }  static Random getDefaultRandom(); static IntSeries sampleIndex(int sampleSize, int originalSize); static IntSeries sampleIndex(int sampleSize, int originalSize, Random random); }
Sampler { public static IntSeries sampleIndex(int sampleSize, int originalSize) { return sampleIndex(sampleSize, originalSize, defaultRandom); }  static Random getDefaultRandom(); static IntSeries sampleIndex(int sampleSize, int originalSize); static IntSeries sampleIndex(int sampleSize, int originalSize, Random random);  }