Package org.apache.datasketches.req
Class ReqSketchBuilder
java.lang.Object
org.apache.datasketches.req.ReqSketchBuilder
public class ReqSketchBuilder extends Object
For building a new ReqSketch
- Author:
- Lee Rhodes
-
Constructor Summary
Constructors Constructor Description ReqSketchBuilder()Constructor for the ReqSketchBuilder. -
Method Summary
Modifier and Type Method Description ReqSketchbuild()Returns a new ReqSketch with the current configuration of the builder.booleangetHighRankAccuracy()Gets the builder confibured value of High Rank Accuracy.intgetK()Gets the builder configured value of k.booleangetLessThanOrEqual()Gets the builder configured value of Less-Than-Or-Equal.ReqDebuggetReqDebug()Gets the builder configured value of ReqDebugReqSketchBuildersetHighRankAccuracy(boolean hra)This sets the parameter highRankAccuracy.ReqSketchBuildersetK(int k)This sets the parameter k.ReqSketchBuildersetLessThanOrEqual(boolean ltEq)Sets the parameter lessThanOrEquals.ReqSketchBuildersetReqDebug(ReqDebug reqDebug)This sets the parameter reqDebug.StringtoString()
-
Constructor Details
-
ReqSketchBuilder
public ReqSketchBuilder()Constructor for the ReqSketchBuilder.
-
-
Method Details
-
build
Returns a new ReqSketch with the current configuration of the builder.- Returns:
- a new ReqSketch
-
getHighRankAccuracy
public boolean getHighRankAccuracy()Gets the builder confibured value of High Rank Accuracy.- Returns:
- the builder confibured value of High Rank Accuracy.
-
getK
public int getK()Gets the builder configured value of k.- Returns:
- the builder configured value of k.
-
getLessThanOrEqual
public boolean getLessThanOrEqual()Gets the builder configured value of Less-Than-Or-Equal.- Returns:
- the builder confibured value of Less-Than-Or-Equal
-
getReqDebug
Gets the builder configured value of ReqDebug- Returns:
- the builder configured value of ReqDebug, or null.
-
setHighRankAccuracy
This sets the parameter highRankAccuracy.- Parameters:
hra- See ReqSketch#ReqSketch(int, boolean, ReqDebug)- Returns:
- this
-
setK
This sets the parameter k.- Parameters:
k- See ReqSketch#ReqSketch(int, boolean, ReqDebug)- Returns:
- this
-
setLessThanOrEqual
Sets the parameter lessThanOrEquals. This parameter can also be modified after the sketch has been constructed. It is included here for convenience.- Parameters:
ltEq- SeeReqSketch.setLessThanOrEqual(boolean)- Returns:
- this
-
setReqDebug
This sets the parameter reqDebug.- Parameters:
reqDebug- See ReqSketch#ReqSketch(int, boolean, ReqDebug)- Returns:
- this
-
toString
-