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 newQueueRandomizer
that will generate a queue with a random number of elements.QueueRandomizer
(Randomizer<T> delegate, int nbElements) Create a newQueueRandomizer
that will generate a queue with a fixed number of elements. -
Method Summary
-
Constructor Details
-
QueueRandomizer
Create a newQueueRandomizer
that will generate a queue with a random number of elements.- Parameters:
delegate
- the delegateRandomizer
used to generate elements
-
QueueRandomizer
Create a newQueueRandomizer
that will generate a queue with a fixed number of elements.- Parameters:
delegate
- The delegateRandomizer
used to generate elementsnbElements
- The number of elements to generate
-
-
Method Details
-
getRandomValue
Description copied from interface:Randomizer
Generate a random value for the given type.- Returns:
- a random value for the given type
-
toString
-