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>
-
Field Summary
Fields inherited from class org.jeasy.random.randomizers.AbstractRandomizer
random
-
Constructor Summary
ConstructorsConstructorDescriptionInstantRangeRandomizer
(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
Modifier and TypeMethodDescriptionprotected void
protected java.time.Instant
protected java.time.Instant
java.time.Instant
Generate a random value for the given type.Methods inherited from class org.jeasy.random.randomizers.AbstractRandomizer
getPredefinedValuesOf, nextDouble, toString
-
Constructor Details
-
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 Details
-
checkValues
protected void checkValues()- Specified by:
checkValues
in classAbstractRangeRandomizer<java.time.Instant>
-
getDefaultMinValue
protected java.time.Instant getDefaultMinValue()- Specified by:
getDefaultMinValue
in classAbstractRangeRandomizer<java.time.Instant>
-
getDefaultMaxValue
protected java.time.Instant getDefaultMaxValue()- Specified by:
getDefaultMaxValue
in classAbstractRangeRandomizer<java.time.Instant>
-
getRandomValue
public java.time.Instant getRandomValue()Description copied from interface:Randomizer
Generate a random value for the given type.- Returns:
- a random value for the given type
-