Class DurationRandomizer
java.lang.Object
org.jeasy.random.randomizers.time.DurationRandomizer
- All Implemented Interfaces:
Randomizer<Duration>
A
Randomizer
that generates random Duration
.- Author:
- Mahmoud Ben Hassine ([email protected])
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newDurationRandomizer
.DurationRandomizer
(long seed) Create a newDurationRandomizer
.DurationRandomizer
(long seed, TemporalUnit unit) Create a newDurationRandomizer
.Create a newDurationRandomizer
. -
Method Summary
Modifier and TypeMethodDescriptionGenerate a random value for the given type.
-
Constructor Details
-
DurationRandomizer
public DurationRandomizer() -
DurationRandomizer
Create a newDurationRandomizer
.- Parameters:
unit
- the temporal unit for created durations
-
DurationRandomizer
public DurationRandomizer(long seed) - Parameters:
seed
- initial seed
-
DurationRandomizer
Create a newDurationRandomizer
.- Parameters:
seed
- initial seedunit
- the temporal unit for created durations
-
-
Method Details
-
getRandomValue
Description copied from interface:Randomizer
Generate a random value for the given type.- Specified by:
getRandomValue
in interfaceRandomizer<Duration>
- Returns:
- a random value for the given type
-