code: public int[] generateUniform(int N, int Max) {
                  if (N * 2 > Max) {
                          return negate(generateUniform(Max - N, Max), Max);
                  }
                  if (2048 * N > Max)
                          return generateUniformBitmap(N, Max);
                  return generateUniformHash(N, Max);
          }
docs: generates randomly N distinct integers from 0 to Max.
  
  @param N
  number of integers to generate
  @param Max
  bound on the value of integers
  @return an array containing randomly selected integers