Package org.apache.solr.bench.generators
Class DoublesDSL
- java.lang.Object
-
- org.apache.solr.bench.generators.DoublesDSL
-
public class DoublesDSL extends Object
A Class for creating Double Sources that will produce doubles within a set interval and will shrink within this domain.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DoublesDSL.DoubleDomainBuilder
-
Constructor Summary
Constructors Constructor Description DoublesDSL()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SolrGen<Double>
all()
Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by Double.POSITIVE_INFINITY.SolrGen<Double>
between(double minInclusive, double maxInclusive)
Generates Doubles inclusively between two boundsDoublesDSL.DoubleDomainBuilder
from(double startInclusive)
Starts a rangeSolrGen<Double>
fromZeroToOne()
Generates Doubles inclusively bounded below by zero and above by one.SolrGen<Double>
negative()
Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by a value very close to zero on the negative side.SolrGen<Double>
positive()
Generates Doubles inclusively bounded below by a value very close to zero on the positive side and above by Double.POSITIVE_INFINITY.
-
-
-
Method Detail
-
all
public SolrGen<Double> all()
Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by Double.POSITIVE_INFINITY.- Returns:
- a Source of type Double
-
negative
public SolrGen<Double> negative()
Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by a value very close to zero on the negative side.- Returns:
- a Source of type Double
-
positive
public SolrGen<Double> positive()
Generates Doubles inclusively bounded below by a value very close to zero on the positive side and above by Double.POSITIVE_INFINITY.- Returns:
- a Source of type Double
-
fromZeroToOne
public SolrGen<Double> fromZeroToOne()
Generates Doubles inclusively bounded below by zero and above by one.- Returns:
- a Source of type Double
-
between
public SolrGen<Double> between(double minInclusive, double maxInclusive)
Generates Doubles inclusively between two bounds- Parameters:
minInclusive
- minimum value to generatemaxInclusive
- maximum value to generate- Returns:
- a Gen of Doubles between minInclusive and maxInclusive
-
from
public DoublesDSL.DoubleDomainBuilder from(double startInclusive)
Starts a range- Parameters:
startInclusive
- - lower bound of domain- Returns:
- start of range
-
-