Package org.apache.solr.bench.generators
Class DoublesDSL
java.lang.Object
org.apache.solr.bench.generators.DoublesDSL
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by Double.POSITIVE_INFINITY.between(double minInclusive, double maxInclusive) Generates Doubles inclusively between two boundsfrom(double startInclusive) Starts a rangeGenerates Doubles inclusively bounded below by zero and above by one.negative()Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by a value very close to zero on the negative side.positive()Generates Doubles inclusively bounded below by a value very close to zero on the positive side and above by Double.POSITIVE_INFINITY.
-
Constructor Details
-
DoublesDSL
public DoublesDSL()
-
-
Method Details
-
all
Generates Doubles inclusively bounded below by Double.NEGATIVE_INFINITY and above by Double.POSITIVE_INFINITY.- Returns:
- a Source of type 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
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
Generates Doubles inclusively bounded below by zero and above by one.- Returns:
- a Source of type Double
-
between
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
Starts a range- Parameters:
startInclusive- - lower bound of domain- Returns:
- start of range
-