Package org.apache.solr.bench.generators
Class SolrGen<T>
- java.lang.Object
-
- org.apache.solr.bench.generators.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 Summary
Fields Modifier and Type Field Description protected org.quicktheories.core.Gen<T>
child
The Child.static char
CLOSE_PAREN
The constant CLOSE_PAREN.static String
COUNT_TYPES_ARE_TRACKED_LIMIT_WAS_REACHED
The constant COUNT_TYPES_ARE_TRACKED_LIMIT_WAS_REACHED.static Map<String,RandomDataHistogram.Counts>
COUNTS
The constant COUNTS.protected long
end
The End.static String
ONLY
The constant ONLY.static String
OPEN_PAREN
The constant OPEN_PAREN.static String
RANDOM_DATA_GEN_REPORTS
The constant RANDOM_DATA_GEN_REPORTS.protected long
start
The Start.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<String>
countsReport()
Counts report list.SolrGen<T>
describedAs(String description)
Described as solr gen.SolrGen<T>
describedAs(org.quicktheories.api.AsString<T> asString)
<R> org.quicktheories.core.Gen<R>
flatMap(Function<? super T,org.quicktheories.core.Gen<? extends R>> mapper)
Flat maps generated values with supplied functionT
generate(SolrRandomnessSource in)
Generate t.T
generate(org.quicktheories.core.RandomnessSource in)
protected Distribution
getDistribution()
Gets distribution.<R> org.quicktheories.core.Gen<R>
map(Function<? super T,? extends R> mapper)
<R> SolrGen<R>
map(Function<? super T,? extends R> mapper, Class<?> type)
Map solr gen.org.quicktheories.core.Gen<T>
mix(org.quicktheories.core.Gen<T> rhs, int weight)
SolrGen<T>
mix(org.quicktheories.core.Gen<T> rhs, int weight, Class<?> type)
Mix solr gen.SolrGen<T>
mix(org.quicktheories.core.Gen<T> rhs, Class<?> type)
Mix solr gen.String
toString()
Class<?>
type()
Type class.SolrGen<T>
withDistribution(Distribution distribution)
With distribution solr gen.
-
-
-
Field Detail
-
OPEN_PAREN
public static final String OPEN_PAREN
The constant OPEN_PAREN.- See Also:
- Constant Field Values
-
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
-
ONLY
public static final String ONLY
The constant ONLY.- 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.
-
COUNTS
public static final Map<String,RandomDataHistogram.Counts> COUNTS
The constant COUNTS.
-
-
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 childtype
- the type
-
SolrGen
protected SolrGen(org.quicktheories.core.Gen<T> child)
Instantiates a new Solr gen.- Parameters:
child
- the child
-
-
Method Detail
-
generate
public T generate(org.quicktheories.core.RandomnessSource in)
- Specified by:
generate
in interfaceorg.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 interfaceorg.quicktheories.core.Gen<T>
-
mix
public SolrGen<T> mix(org.quicktheories.core.Gen<T> rhs, Class<?> type)
Mix solr gen.- Parameters:
rhs
- the rhstype
- 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 interfaceorg.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 rhsweight
- the weighttype
- 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 interfaceorg.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 interfaceorg.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 mappertype
- 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
-
-