Package org.apache.solr.bench
Class SolrGenerate
- java.lang.Object
- 
- org.apache.solr.bench.SolrGenerate
 
- 
 public class SolrGenerate extends Object The type Solr generate.
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static SolrGen<Boolean>booleans()Booleans solr gen.static SolrGen<Integer>codePoints(int startInclusive, int endInclusive)Code points solr gen.static <T> SolrGen<T>constant(T constant)Constant solr gen.static <T> SolrGen<T>frequency(List<org.quicktheories.api.Pair<Integer,SolrGen<T>>> weightedGens)Returns a generator that provides a value from a generator chosen with probability in proportion to the weight supplied in thePair.static <T> SolrGen<T>frequency(org.quicktheories.api.Pair<Integer,SolrGen<T>> mandatory, org.quicktheories.api.Pair<Integer,SolrGen<T>>... others)Returns a generator that provides a value from a generator chosen with probability in proportion to the weight supplied in thePair.static SolrGen<int[]>intArrays(SolrGen<Integer> sizes, SolrGen<Integer> contents)Int arrays solr gen.static SolrGen<Long>longRange(long startInclusive, long endInclusive)Long range solr gen.static <T> SolrGen<T>oneOf(SolrGen<T> mandatory, SolrGen<T>... others)Returns a generator that provides a value from a random generator provided.static <T> SolrGen<T>pick(List<T> ts)Randomly returns one of the supplied valuesstatic SolrGen<Integer>range(int startInclusive, int endInclusive)Range solr gen.
 
- 
- 
- 
Method Detail- 
constantpublic static <T> SolrGen<T> constant(T constant) Constant solr gen.- Type Parameters:
- T- the type parameter
- Parameters:
- constant- the constant
- Returns:
- the solr gen
 
 - 
rangepublic static SolrGen<Integer> range(int startInclusive, int endInclusive) Range solr gen.- Parameters:
- startInclusive- the start inclusive
- endInclusive- the end inclusive
- Returns:
- the solr gen
 
 - 
longRangepublic static SolrGen<Long> longRange(long startInclusive, long endInclusive) Long range solr gen.- Parameters:
- startInclusive- the start inclusive
- endInclusive- the end inclusive
- Returns:
- the solr gen
 
 - 
intArrayspublic static SolrGen<int[]> intArrays(SolrGen<Integer> sizes, SolrGen<Integer> contents) Int arrays solr gen.- Parameters:
- sizes- the sizes
- contents- the contents
- Returns:
- the solr gen
 
 - 
codePointspublic static SolrGen<Integer> codePoints(int startInclusive, int endInclusive) Code points solr gen.- Parameters:
- startInclusive- the start inclusive
- endInclusive- the end inclusive
- Returns:
- the solr gen
 
 - 
frequency@SafeVarargs public static <T> SolrGen<T> frequency(org.quicktheories.api.Pair<Integer,SolrGen<T>> mandatory, org.quicktheories.api.Pair<Integer,SolrGen<T>>... others) Returns a generator that provides a value from a generator chosen with probability in proportion to the weight supplied in thePair. Shrinking is towards the first non-zero weight in the list. At least one generator must have a positive weight and non-positive generators will never be chosen.- Type Parameters:
- T- Type to generate
- Parameters:
- mandatory- Generator to sample from
- others- Other generators to sample
- Returns:
- A gen of T
 
 - 
frequencypublic static <T> SolrGen<T> frequency(List<org.quicktheories.api.Pair<Integer,SolrGen<T>>> weightedGens) Returns a generator that provides a value from a generator chosen with probability in proportion to the weight supplied in thePair. Shrinking is towards the first non-zero weight in the list. At least one generator must have a positive weight and non-positive generators will never be chosen.- Type Parameters:
- T- Type to generate
- Parameters:
- weightedGens- pairs of weight and generators to sample in proportion to their weighting
- Returns:
- A gen of T
 
 - 
pickpublic static <T> SolrGen<T> pick(List<T> ts) Randomly returns one of the supplied values- Type Parameters:
- T- type of value to generate *
- Parameters:
- ts- Values to pick from
- Returns:
- A Gen of T
 
 - 
oneOf@SafeVarargs public static <T> SolrGen<T> oneOf(SolrGen<T> mandatory, SolrGen<T>... others) Returns a generator that provides a value from a random generator provided.- Type Parameters:
- T- Type to generate
- Parameters:
- mandatory- Generator to sample from
- others- Other generators to sample from with equal weighting
- Returns:
- A gen of T
 
 
- 
 
-