public class ListUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.Integer> |
pickNDistinctRandom(int min,
int max)
Creates a shuffled list where each and every number in the range between
min and max appear exactly once. |
static java.util.List<java.lang.Integer> |
pickNDistinctRandom(int min,
int max,
int count)
Picks
count distinct random numbers in the range between
min and max , included. |
static <T> void |
reverse(java.util.List<T> src,
java.util.List<T> dst)
It copies list src onto dst in reversed order, eventually clearing the
destination list dst beforehand.
|
public static <T> void reverse(java.util.List<T> src, java.util.List<T> dst)
src
- dst
- public static java.util.List<java.lang.Integer> pickNDistinctRandom(int min, int max)
min
and max
appear exactly once.min
- max
- public static java.util.List<java.lang.Integer> pickNDistinctRandom(int min, int max, int count)
count
distinct random numbers in the range between
min
and max
, included.min
- max
- count
-