K - the type of keysV - the type of valuespublic class MapRandomizer<K,V> extends Object implements Randomizer<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(Randomizer<K> keyRandomizer,
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. |
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
Randomizer<K> keyRandomizer,
@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 valuesMapRandomizerpublic 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 generateMapRandomizerpublic Map<K,V> getRandomValue()
RandomizergetRandomValue in interface Randomizer<Map<K,V>>Copyright © 2017. All Rights Reserved.