Class InstantRandomizer
- java.lang.Object
-
- org.jeasy.random.randomizers.time.InstantRandomizer
-
- All Implemented Interfaces:
Randomizer<java.time.Instant>
public class InstantRandomizer extends java.lang.Object implements Randomizer<java.time.Instant>
ARandomizerthat generates randomInstant.- Author:
- Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
-
-
Constructor Summary
Constructors Constructor Description InstantRandomizer()Create a newInstantRandomizer.InstantRandomizer(long seed)Create a newInstantRandomizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.InstantgetRandomValue()Generate a random value for the given type.
-
-
-
Constructor Detail
-
InstantRandomizer
public InstantRandomizer()
Create a newInstantRandomizer.
-
InstantRandomizer
public InstantRandomizer(long seed)
Create a newInstantRandomizer.- Parameters:
seed- initial seed
-
-
Method Detail
-
getRandomValue
public java.time.Instant getRandomValue()
Description copied from interface:RandomizerGenerate a random value for the given type.- Specified by:
getRandomValuein interfaceRandomizer<java.time.Instant>- Returns:
- a random value for the given type
-
-