Class SolrGen<T>

  • Type Parameters:
    T - the type parameter
    All Implemented Interfaces:
    org.quicktheories.api.AsString<T>, org.quicktheories.core.Gen<T>
    Direct Known Subclasses:
    LazyGen, NamedListGen

    public class SolrGen<T>
    extends Object
    implements org.quicktheories.core.Gen<T>
    The type Solr gen.
    • Field Detail

      • CLOSE_PAREN

        public static final char CLOSE_PAREN
        The constant CLOSE_PAREN.
        See Also:
        Constant Field Values
      • COUNT_TYPES_ARE_TRACKED_LIMIT_WAS_REACHED

        public static final String COUNT_TYPES_ARE_TRACKED_LIMIT_WAS_REACHED
        The constant COUNT_TYPES_ARE_TRACKED_LIMIT_WAS_REACHED.
        See Also:
        Constant Field Values
      • RANDOM_DATA_GEN_REPORTS

        public static final String RANDOM_DATA_GEN_REPORTS
        The constant RANDOM_DATA_GEN_REPORTS.
        See Also:
        Constant Field Values
      • child

        protected final org.quicktheories.core.Gen<T> child
        The Child.
      • start

        protected long start
        The Start.
      • end

        protected long end
        The End.
    • Constructor Detail

      • SolrGen

        protected SolrGen()
        Instantiates a new Solr gen.
      • SolrGen

        public SolrGen​(org.quicktheories.core.Gen<T> child,
                       Class<?> type)
        Instantiates a new Solr gen.
        Parameters:
        child - the child
        type - the type
      • SolrGen

        protected SolrGen​(org.quicktheories.core.Gen<T> child)
        Instantiates a new Solr gen.
        Parameters:
        child - the child
    • Method Detail

      • countsReport

        public static List<String> countsReport()
        Counts report list.
        Returns:
        the list
      • generate

        public T generate​(org.quicktheories.core.RandomnessSource in)
        Specified by:
        generate in interface org.quicktheories.core.Gen<T>
      • generate

        public T generate​(SolrRandomnessSource in)
        Generate t.
        Parameters:
        in - the in
        Returns:
        the t
      • type

        public Class<?> type()
        Type class.
        Returns:
        the class
      • describedAs

        public SolrGen<T> describedAs​(String description)
        Described as solr gen.
        Parameters:
        description - the description
        Returns:
        the solr gen
      • describedAs

        public SolrGen<T> describedAs​(org.quicktheories.api.AsString<T> asString)
        Specified by:
        describedAs in interface org.quicktheories.core.Gen<T>
      • mix

        public SolrGen<T> mix​(org.quicktheories.core.Gen<T> rhs,
                              Class<?> type)
        Mix solr gen.
        Parameters:
        rhs - the rhs
        type - the type
        Returns:
        the solr gen
      • mix

        public org.quicktheories.core.Gen<T> mix​(org.quicktheories.core.Gen<T> rhs,
                                                 int weight)
        Specified by:
        mix in interface org.quicktheories.core.Gen<T>
      • mix

        public SolrGen<T> mix​(org.quicktheories.core.Gen<T> rhs,
                              int weight,
                              Class<?> type)
        Mix solr gen.
        Parameters:
        rhs - the rhs
        weight - the weight
        type - the type
        Returns:
        the solr gen
      • flatMap

        public <R> org.quicktheories.core.Gen<R> flatMap​(Function<? super T,​org.quicktheories.core.Gen<? extends R>> mapper)
        Flat maps generated values with supplied function
        Specified by:
        flatMap in interface org.quicktheories.core.Gen<T>
        Type Parameters:
        R - Type to map to
        Parameters:
        mapper - function to map with
        Returns:
        A Gen of R
      • map

        public <R> org.quicktheories.core.Gen<R> map​(Function<? super T,​? extends R> mapper)
        Specified by:
        map in interface org.quicktheories.core.Gen<T>
      • map

        public <R> SolrGen<R> map​(Function<? super T,​? extends R> mapper,
                                  Class<?> type)
        Map solr gen.
        Type Parameters:
        R - the type parameter
        Parameters:
        mapper - the mapper
        type - the type
        Returns:
        the solr gen
      • withDistribution

        public SolrGen<T> withDistribution​(Distribution distribution)
        With distribution solr gen.
        Parameters:
        distribution - the distribution
        Returns:
        the solr gen
      • getDistribution

        protected Distribution getDistribution()
        Gets distribution.
        Returns:
        the distribution