Class DoubleRangeRandomizer
- java.lang.Object
-
- org.jeasy.random.randomizers.AbstractRandomizer<T>
-
- org.jeasy.random.randomizers.range.AbstractRangeRandomizer<java.lang.Double>
-
- org.jeasy.random.randomizers.range.DoubleRangeRandomizer
-
- All Implemented Interfaces:
Randomizer<java.lang.Double>
public class DoubleRangeRandomizer extends AbstractRangeRandomizer<java.lang.Double>
Generate a randomDoublein the given range.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Field Summary
-
Fields inherited from class org.jeasy.random.randomizers.AbstractRandomizer
random
-
-
Constructor Summary
Constructors Constructor Description DoubleRangeRandomizer(java.lang.Double min, java.lang.Double max)Create a newDoubleRangeRandomizer.DoubleRangeRandomizer(java.lang.Double min, java.lang.Double max, long seed)Create a newDoubleRangeRandomizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValues()protected java.lang.DoublegetDefaultMaxValue()protected java.lang.DoublegetDefaultMinValue()java.lang.DoublegetRandomValue()Generate a random value for the given type.-
Methods inherited from class org.jeasy.random.randomizers.AbstractRandomizer
getPredefinedValuesOf, nextDouble, toString
-
-
-
-
Constructor Detail
-
DoubleRangeRandomizer
public DoubleRangeRandomizer(java.lang.Double min, java.lang.Double max)Create a newDoubleRangeRandomizer.- Parameters:
min- min value (inclusive)max- max value (exclusive)
-
DoubleRangeRandomizer
public DoubleRangeRandomizer(java.lang.Double min, java.lang.Double max, long seed)Create a newDoubleRangeRandomizer.- Parameters:
min- min value (inclusive)max- max value (exclusive)seed- initial seed
-
-
Method Detail
-
checkValues
protected void checkValues()
- Specified by:
checkValuesin classAbstractRangeRandomizer<java.lang.Double>
-
getDefaultMinValue
protected java.lang.Double getDefaultMinValue()
- Specified by:
getDefaultMinValuein classAbstractRangeRandomizer<java.lang.Double>
-
getDefaultMaxValue
protected java.lang.Double getDefaultMaxValue()
- Specified by:
getDefaultMaxValuein classAbstractRangeRandomizer<java.lang.Double>
-
getRandomValue
public java.lang.Double getRandomValue()
Description copied from interface:RandomizerGenerate a random value for the given type.- Returns:
- a random value for the given type
-
-