Class ShortRangeRandomizer
java.lang.Object
io.github.krandom.randomizers.AbstractRandomizer<T>
io.github.krandom.randomizers.range.AbstractRangeRandomizer<Short>
io.github.krandom.randomizers.range.ShortRangeRandomizer
- All Implemented Interfaces:
Randomizer<Short>
Generate a random
Short
in the given range.-
Field Summary
Fields inherited from class io.github.krandom.randomizers.AbstractRandomizer
random
-
Constructor Summary
ConstructorsConstructorDescriptionShortRangeRandomizer
(Short min, Short max) Create a newShortRangeRandomizer
.ShortRangeRandomizer
(Short min, Short max, long seed) Create a newShortRangeRandomizer
. -
Method Summary
Methods inherited from class io.github.krandom.randomizers.AbstractRandomizer
getPredefinedValuesOf, nextDouble, toString
-
Constructor Details
-
ShortRangeRandomizer
Create a newShortRangeRandomizer
.- Parameters:
min
- min value (inclusive)max
- max value (exclusive)
-
ShortRangeRandomizer
Create a newShortRangeRandomizer
.- Parameters:
min
- min value (inclusive)max
- max value (exclusive)seed
- initial seed
-
-
Method Details
-
checkValues
protected void checkValues()- Specified by:
checkValues
in classAbstractRangeRandomizer<Short>
-
getRandomValue
Description copied from interface:Randomizer
Generate a random value for the given type.- Returns:
- a random value for the given type
-
getDefaultMaxValue
- Specified by:
getDefaultMaxValue
in classAbstractRangeRandomizer<Short>
-
getDefaultMinValue
- Specified by:
getDefaultMinValue
in classAbstractRangeRandomizer<Short>
-