Class MapsDSL.MapGeneratorBuilder<K,V>

java.lang.Object
org.apache.solr.bench.generators.MapsDSL.MapGeneratorBuilder<K,V>
Type Parameters:
K - key type to generate
V - 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

    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 fixed
    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
    org.quicktheories.core.Gen<Map<K,V>>
    ofSizes(org.quicktheories.core.Gen<Integer> sizes)
    Generates a Map of objects with sizes drawn from sizes gen

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MapGeneratorBuilder

      public MapGeneratorBuilder(org.quicktheories.core.Gen<K> kg, org.quicktheories.core.Gen<V> vg)
  • Method Details

    • 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 Map
      maxSize - inclusive maximum size of Map
      Returns:
      a Source of Maps of type T
    • ofSizes

      public org.quicktheories.core.Gen<Map<K,V>> ofSizes(org.quicktheories.core.Gen<Integer> sizes)
      Generates a Map of objects with sizes drawn from sizes gen
      Parameters:
      sizes - Sizes of maps to generate
      Returns:
      A Source of Maps of Type T