code: public static int getRandomInteger(int min, int max)
      {
          Check.inferiorOrEqual(min, max);
  
          return min + RANDOM.nextInt(max + 1 - min);
      }
docs: Get a random value from an interval.
  
  @param min The minimum value.
  @param max The maximum value (positive and superior or equal to min).
  @return A value between min inclusive and max inclusive.