Package org.stubit.random
Interface RandomNumber.RandomNumberBuilder<N>
- Type Parameters:
N- the type of the number to build
- All Known Implementing Classes:
RandomNumber.RandomIntBuilder,RandomNumber.RandomLongBuilder
- Enclosing class:
- RandomNumber
public static interface RandomNumber.RandomNumberBuilder<N>
Interface for any random number builder.
-
Method Details
-
positive
RandomNumber.RandomNumberBuilder<N> positive()- Returns:
- this
-
negative
RandomNumber.RandomNumberBuilder<N> negative()Setsmin(N)to the minimum of N and max to -1.- Returns:
- this
-
min
- Parameters:
minInclusive- the minimum value (inclusive)- Returns:
- this
- Throws:
IllegalArgumentException- ifminInclusiveis greater than or equal tomax(N)
-
max
- Parameters:
maxInclusive- the maximum value (inclusive)- Returns:
- this
- Throws:
IllegalArgumentException- ifmaxInclusiveis less than or equal tomin(N)or ifmaxInclusiveis equal to the maximum of N
-
build
N build()
-