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 voidprotected java.time.Instantprotected java.time.Instantjava.time.InstantGenerate 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:
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
-