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