diff --git a/jetCheck/src/jetCheck/Generator.java b/jetCheck/src/jetCheck/Generator.java index bef721c21c1a..2e8bc41c314c 100644 --- a/jetCheck/src/jetCheck/Generator.java +++ b/jetCheck/src/jetCheck/Generator.java @@ -227,9 +227,13 @@ public class Generator { return integers(0, Integer.MAX_VALUE); } - /** Generates integers in the given range (both ends inclusive) */ + /** Generates integers uniformly distributed in the given range (both ends inclusive) */ public static Generator integers(int min, int max) { - IntDistribution distribution = IntDistribution.uniform(min, max); + return integers(IntDistribution.uniform(min, max)); + } + + /** Generates integers with the given distribution */ + public static Generator integers(@NotNull IntDistribution distribution) { return from(data -> data.drawInt(distribution)); }