Package org.apache.solr.bench.generators
Class ListsDSL
- java.lang.Object
-
- org.apache.solr.bench.generators.ListsDSL
-
public class ListsDSL extends Object
A Class for creating List Sources that will produce List objects of either fixed or bounded size.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListsDSL.ListGeneratorBuilder<T>
ListGeneratorBuilder enables the creation of Sources for Lists of fixed and bounded size, where no Collector is specified.static class
ListsDSL.TypedListGeneratorBuilder<T>
TypedListGeneratorBuilder enables the creation of Sources for Lists of fixed and bounded size, where the Collector is fixed.
-
Constructor Summary
Constructors Constructor Description ListsDSL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,A extends List<T>>
Collector<T,List<T>,List<T>>arrayList()
<T,A extends List<T>>
Collector<T,A,A>createListCollector(Supplier<A> collectionFactory)
Creates an appropriate Collector for a type of List by specifying the Supplier used as a parameter<T,A extends List<T>>
Collector<T,List<T>,List<T>>linkedList()
<T> ListsDSL.ListGeneratorBuilder<T>
of(org.quicktheories.core.Gen<T> source)
Creates a ListGeneratorBuilder.
-
-
-
Method Detail
-
createListCollector
public <T,A extends List<T>> Collector<T,A,A> createListCollector(Supplier<A> collectionFactory)
Creates an appropriate Collector for a type of List by specifying the Supplier used as a parameter- Type Parameters:
T
- type to generateA
- list type- Parameters:
collectionFactory
- a supplier of A- Returns:
- a Collector
-
of
public <T> ListsDSL.ListGeneratorBuilder<T> of(org.quicktheories.core.Gen<T> source)
Creates a ListGeneratorBuilder.- Type Parameters:
T
- type to generate- Parameters:
source
- a Source of type T for the items in the list- Returns:
- a ListGeneratorBuilder of type T
-
-