Package org.apache.solr.bench.generators
Class ListsDSL.ListGeneratorBuilder<T>
- java.lang.Object
-
- org.apache.solr.bench.generators.ListsDSL.ListGeneratorBuilder<T>
-
- Type Parameters:
T
- type to generate
- Enclosing class:
- ListsDSL
public static class ListsDSL.ListGeneratorBuilder<T> extends Object
ListGeneratorBuilder enables the creation of Sources for Lists of fixed and bounded size, where no Collector is specified. A ListGeneratorBuilder can be used to create a TypedListGeneratorBuilder, where the Collector is specified.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.quicktheories.core.Gen<List<T>>
ofSize(int size)
Generates a List of objects, where the size of the List is fixedorg.quicktheories.core.Gen<List<T>>
ofSizeBetween(int minimumSize, int maximumSize)
Generates a List of objects, where the size of the List is bounded by minimumSize and maximumSizeorg.quicktheories.core.Gen<List<T>>
ofSizes(org.quicktheories.core.Gen<Integer> sizes)
ListsDSL.TypedListGeneratorBuilder<T>
ofType(Collector<T,List<T>,List<T>> collector)
Determines how the Lists will be collected and returns an TypedListGeneratorBuilder with the Collector specified
-
-
-
Field Detail
-
source
protected final org.quicktheories.core.Gen<T> source
-
-
Method Detail
-
ofSize
public org.quicktheories.core.Gen<List<T>> ofSize(int size)
Generates a List of objects, where the size of the List is fixed- Parameters:
size
- size of lists to generate- Returns:
- a Source of Lists of type T
-
ofSizeBetween
public org.quicktheories.core.Gen<List<T>> ofSizeBetween(int minimumSize, int maximumSize)
Generates a List of objects, where the size of the List is bounded by minimumSize and maximumSize- Parameters:
minimumSize
- - inclusive minimum size of ListmaximumSize
- - inclusive maximum size of List- Returns:
- a Source of Lists of type T
-
ofSizes
public org.quicktheories.core.Gen<List<T>> ofSizes(org.quicktheories.core.Gen<Integer> sizes)
-
ofType
public ListsDSL.TypedListGeneratorBuilder<T> ofType(Collector<T,List<T>,List<T>> collector)
Determines how the Lists will be collected and returns an TypedListGeneratorBuilder with the Collector specified- Parameters:
collector
- collector to use to construct list- Returns:
- a TypedListGeneratorBuilder
-
-