K
- the type of keysV
- the type of valuespublic class MapRandomizer<K,V> extends java.lang.Object implements Randomizer<java.util.Map<K,V>>
Randomizer
that generates a Map
with random entries.Constructor and Description |
---|
MapRandomizer(Randomizer<K> keyRandomizer,
Randomizer<V> valueRandomizer)
Create a new
MapRandomizer with a random number of entries. |
MapRandomizer(@NonNull Randomizer<K> keyRandomizer,
@NonNull Randomizer<V> valueRandomizer,
int nbEntries)
Create a new
MapRandomizer with a fixed number of entries. |
Modifier and Type | Method and Description |
---|---|
static <K,V> MapRandomizer<K,V> |
aNewMapRandomizer(Randomizer<K> keyRandomizer,
Randomizer<V> valueRandomizer)
Create a new
MapRandomizer with a random number of entries. |
static <K,V> MapRandomizer<K,V> |
aNewMapRandomizer(Randomizer<K> keyRandomizer,
Randomizer<V> valueRandomizer,
int nbEntries)
Create a new
MapRandomizer with a fixed number of entries. |
java.util.Map<K,V> |
getRandomValue()
Generate a random value for the given type.
|
public MapRandomizer(Randomizer<K> keyRandomizer, Randomizer<V> valueRandomizer)
MapRandomizer
with a random number of entries.keyRandomizer
- the randomizer for keysvalueRandomizer
- the randomizer for valuespublic MapRandomizer(@NonNull @NonNull Randomizer<K> keyRandomizer, @NonNull @NonNull Randomizer<V> valueRandomizer, int nbEntries)
MapRandomizer
with a fixed number of entries.keyRandomizer
- the randomizer for keysvalueRandomizer
- the randomizer for valuesnbEntries
- the number of entries to generatepublic static <K,V> MapRandomizer<K,V> aNewMapRandomizer(Randomizer<K> keyRandomizer, Randomizer<V> valueRandomizer)
MapRandomizer
with a random number of entries.K
- the type of key elementsV
- the type of value elementskeyRandomizer
- the randomizer for keysvalueRandomizer
- the randomizer for valuesMapRandomizer
public static <K,V> MapRandomizer<K,V> aNewMapRandomizer(Randomizer<K> keyRandomizer, Randomizer<V> valueRandomizer, int nbEntries)
MapRandomizer
with a fixed number of entries.K
- the type of key elementsV
- the type of value elementskeyRandomizer
- the randomizer for keysvalueRandomizer
- the randomizer for valuesnbEntries
- the number of entries to generateMapRandomizer
public java.util.Map<K,V> getRandomValue()
Randomizer
getRandomValue
in interface Randomizer<java.util.Map<K,V>>
Copyright © 2019. All Rights Reserved.