Class ListsDSL


  • public class ListsDSL
    extends Object
    A Class for creating List Sources that will produce List objects of either fixed or bounded size.
    • Constructor Detail

      • ListsDSL

        public ListsDSL()
    • 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 generate
        A - 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