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