com.gojek.de.stencil.utils.RandomUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stencil Show documentation
Show all versions of stencil Show documentation
Library to pull latest proto descriptors from a remote server
package com.gojek.de.stencil.utils;
import java.util.Random;
public class RandomUtils {
public int getRandomNumberInRange(int min, int max) {
if (min >= max) {
throw new IllegalArgumentException("max must be greater than min");
}
Random r = new Random();
return r.nextInt((max - min) + 1) + min;
}
}