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