Package org.apache.solr.bench.generators
Class MapsDSL.MapGeneratorBuilder<K,V>
- java.lang.Object
-
- org.apache.solr.bench.generators.MapsDSL.MapGeneratorBuilder<K,V>
-
- Type Parameters:
K
- key type to generateV
- value type to generate
- Enclosing class:
- MapsDSL
public static class MapsDSL.MapGeneratorBuilder<K,V> extends Object
MapGeneratorBuilder enables the creation of Sources for Maps of fixed and bounded size, where no Collector is specified. A MapGeneratorBuilder can be used to create a TypedListGeneratorBuilder, where the Collector is specified.
-
-
Constructor Summary
Constructors Constructor Description MapGeneratorBuilder(org.quicktheories.core.Gen<K> kg, org.quicktheories.core.Gen<V> vg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.quicktheories.core.Gen<Map<K,V>>
ofSize(int size)
Generates a Map of objects, where the size of the Map is fixedorg.quicktheories.core.Gen<Map<K,V>>
ofSizeBetween(int minSize, int maxSize)
Generates a Map of objects, where the size of the Map is bounded by minimumSize and maximumSizeorg.quicktheories.core.Gen<Map<K,V>>
ofSizes(org.quicktheories.core.Gen<Integer> sizes)
Generates a Map of objects with sizes drawn from sizes gen
-
-
-
Method Detail
-
ofSize
public org.quicktheories.core.Gen<Map<K,V>> ofSize(int size)
Generates a Map of objects, where the size of the Map is fixed- Parameters:
size
- size of lists to generate- Returns:
- a Source of Maps of type K,V
-
ofSizeBetween
public org.quicktheories.core.Gen<Map<K,V>> ofSizeBetween(int minSize, int maxSize)
Generates a Map of objects, where the size of the Map is bounded by minimumSize and maximumSize- Parameters:
minSize
- inclusive minimum size of MapmaxSize
- inclusive maximum size of Map- Returns:
- a Source of Maps of type T
-
-