Class InstantRangeRandomizer
- java.lang.Object
-
- org.jeasy.random.randomizers.AbstractRandomizer<T>
-
- org.jeasy.random.randomizers.range.AbstractRangeRandomizer<java.time.Instant>
-
- org.jeasy.random.randomizers.range.InstantRangeRandomizer
-
- All Implemented Interfaces:
Randomizer<java.time.Instant>
public class InstantRangeRandomizer extends AbstractRangeRandomizer<java.time.Instant>
-
-
Field Summary
-
Fields inherited from class org.jeasy.random.randomizers.AbstractRandomizer
random
-
-
Constructor Summary
Constructors Constructor Description InstantRangeRandomizer(java.time.Instant min, java.time.Instant max)Create a newInstantRangeRandomizer.InstantRangeRandomizer(java.time.Instant min, java.time.Instant max, long seed)Create a newInstantRangeRandomizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckValues()protected java.time.InstantgetDefaultMaxValue()protected java.time.InstantgetDefaultMinValue()java.time.InstantgetRandomValue()Generate a random value for the given type.-
Methods inherited from class org.jeasy.random.randomizers.AbstractRandomizer
getPredefinedValuesOf, nextDouble, toString
-
-
-
-
Constructor Detail
-
InstantRangeRandomizer
public InstantRangeRandomizer(java.time.Instant min, java.time.Instant max)Create a newInstantRangeRandomizer.- Parameters:
min- min value (inclusive)max- max value (exclusive)
-
InstantRangeRandomizer
public InstantRangeRandomizer(java.time.Instant min, java.time.Instant max, long seed)Create a newInstantRangeRandomizer.- Parameters:
min- min value (inclusive)max- max value (exclusive)seed- initial seed
-
-
Method Detail
-
checkValues
protected void checkValues()
- Specified by:
checkValuesin classAbstractRangeRandomizer<java.time.Instant>
-
getDefaultMinValue
protected java.time.Instant getDefaultMinValue()
- Specified by:
getDefaultMinValuein classAbstractRangeRandomizer<java.time.Instant>
-
getDefaultMaxValue
protected java.time.Instant getDefaultMaxValue()
- Specified by:
getDefaultMaxValuein classAbstractRangeRandomizer<java.time.Instant>
-
getRandomValue
public java.time.Instant getRandomValue()
Description copied from interface:RandomizerGenerate a random value for the given type.- Returns:
- a random value for the given type
-
-