Class QueueRandomizer<T>
java.lang.Object
org.jeasy.random.randomizers.collection.QueueRandomizer<T>
- Type Parameters:
T- the type of elements in the queue
- All Implemented Interfaces:
Randomizer<Collection<T>>
A
Randomizer that generates a queue of random values using a delegate Randomizer.- Author:
- Mahmoud Ben Hassine ([email protected])
-
Constructor Summary
ConstructorsConstructorDescriptionQueueRandomizer(Randomizer<T> delegate) Create a newQueueRandomizerthat will generate a queue with a random number of elements.QueueRandomizer(Randomizer<T> delegate, int nbElements) Create a newQueueRandomizerthat will generate a queue with a fixed number of elements. -
Method Summary
-
Constructor Details
-
QueueRandomizer
Create a newQueueRandomizerthat will generate a queue with a random number of elements.- Parameters:
delegate- the delegateRandomizerused to generate elements
-
QueueRandomizer
Create a newQueueRandomizerthat will generate a queue with a fixed number of elements.- Parameters:
delegate- The delegateRandomizerused to generate elementsnbElements- The number of elements to generate
-
-
Method Details
-
getRandomValue
Description copied from interface:RandomizerGenerate a random value for the given type.- Returns:
- a random value for the given type
-
toString
-