Package com.tnsai.evaluation.model
Record Class QualityGateConfig
java.lang.Object
java.lang.Record
com.tnsai.evaluation.model.QualityGateConfig
public record QualityGateConfig(double defaultThreshold, Map<String,Double> evaluatorThresholds, double maxRegressionPercent, double minPassRate)
extends Record
Configuration for quality gate pass/fail thresholds.
- Since:
- 0.1.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionQualityGateConfig(double defaultThreshold, Map<String, Double> evaluatorThresholds, double maxRegressionPercent, double minPassRate) Creates an instance of aQualityGateConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic QualityGateConfig.Builderbuilder()Builder for fluent construction.static QualityGateConfigdefaults()Default config: 0.7 threshold, 5% max regression, 80% pass rate.doubleReturns the value of thedefaultThresholdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theevaluatorThresholdsrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themaxRegressionPercentrecord component.doubleReturns the value of theminPassRaterecord component.doublethresholdFor(String evaluatorName) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
QualityGateConfig
public QualityGateConfig(double defaultThreshold, Map<String, Double> evaluatorThresholds, double maxRegressionPercent, double minPassRate) Creates an instance of aQualityGateConfigrecord class.- Parameters:
defaultThreshold- the value for thedefaultThresholdrecord componentevaluatorThresholds- the value for theevaluatorThresholdsrecord componentmaxRegressionPercent- the value for themaxRegressionPercentrecord componentminPassRate- the value for theminPassRaterecord component
-
-
Method Details
-
defaults
Default config: 0.7 threshold, 5% max regression, 80% pass rate. -
thresholdFor
-
builder
Builder for fluent construction. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
defaultThreshold
public double defaultThreshold()Returns the value of thedefaultThresholdrecord component.- Returns:
- the value of the
defaultThresholdrecord component
-
evaluatorThresholds
Returns the value of theevaluatorThresholdsrecord component.- Returns:
- the value of the
evaluatorThresholdsrecord component
-
maxRegressionPercent
public double maxRegressionPercent()Returns the value of themaxRegressionPercentrecord component.- Returns:
- the value of the
maxRegressionPercentrecord component
-
minPassRate
public double minPassRate()Returns the value of theminPassRaterecord component.- Returns:
- the value of the
minPassRaterecord component
-