Class RandomInt

java.lang.Object
org.stubit.random.RandomInt

public class RandomInt extends Object
  • Method Details

    • anIntBetween

      public static int anIntBetween(int minInclusive, int maxInclusive)
      Parameters:
      minInclusive - the minimum value (inclusive)
      maxInclusive - the maximum value (inclusive)
      Returns:
      a random integer between minInclusive and maxInclusive
    • aNegativeInt

      public static int aNegativeInt()
      Returns:
      a random integer between Integer.MIN_VALUE and -1
    • aPositiveInt

      public static int aPositiveInt()
      Returns:
      a random integer between 1 and Integer.MAX_VALUE - 1
    • anInt

      public static RandomInt.RandomIntBuilder anInt()
      Returns:
      a RandomInt.RandomIntBuilder with min Integer.MIN_VALUE and max Integer.MAX_VALUE - 1.