Package org.dbunit.dataset.datatype
Class ToleratedDeltaMap.ToleratedDelta
java.lang.Object
org.dbunit.dataset.datatype.ToleratedDeltaMap.ToleratedDelta
- Enclosing class:
ToleratedDeltaMap
Simple bean that holds the tolerance for floating point comparisons for a
specific database column.
-
Constructor Summary
ConstructorsConstructorDescriptionToleratedDelta(String tableName, String columnName, double toleratedDelta) Creates a tolerated delta for the given table/column, expressed as adouble.ToleratedDelta(String tableName, String columnName, BigDecimal toleratedDelta) Creates a tolerated delta for the given table/column, expressed as aBigDecimal.ToleratedDelta(String tableName, String columnName, BigDecimal toleratedDelta, boolean isPercentage) Creates a tolerated delta for the given table/column, optionally as a percentage.ToleratedDelta(String tableName, String columnName, ToleratedDeltaMap.Precision toleratedDelta) Creates a tolerated delta for the given table/column. -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the column.Returns the name of the table.Returns the tolerated delta.booleanChecks whether or not thetableNameand thecolumnNamematch the ones of this object.toString()
-
Constructor Details
-
ToleratedDelta
Creates a tolerated delta for the given table/column, expressed as adouble.- Parameters:
tableName- The name of the tablecolumnName- The name of the column for which the tolerated delta should be appliedtoleratedDelta- The tolerated delta. For example 1E-5 means that the comparison must match the first 5 decimal digits. All subsequent decimals are ignored.
-
ToleratedDelta
Creates a tolerated delta for the given table/column, expressed as aBigDecimal.- Parameters:
tableName- The name of the tablecolumnName- The name of the column for which the tolerated delta should be appliedtoleratedDelta- The tolerated delta. For example 1E-5 means that the comparison must match the first 5 decimal digits. All subsequent decimals are ignored.
-
ToleratedDelta
public ToleratedDelta(String tableName, String columnName, BigDecimal toleratedDelta, boolean isPercentage) Creates a tolerated delta for the given table/column, optionally as a percentage.- Parameters:
tableName- The name of the tablecolumnName- The name of the column for which the tolerated delta should be appliedtoleratedDelta- The tolerated delta. For example 1E-5 means that the comparison must match the first 5 decimal digits. All subsequent decimals are ignored.isPercentage- Whether or not the given toleratedDelta value is a percentage. SeeToleratedDeltaMap.Precisionfor more.
-
ToleratedDelta
public ToleratedDelta(String tableName, String columnName, ToleratedDeltaMap.Precision toleratedDelta) Creates a tolerated delta for the given table/column.- Parameters:
tableName- The name of the tablecolumnName- The name of the column for which the tolerated delta should be appliedtoleratedDelta- The tolerated delta. For example 1E-5 means that the comparison must match the first 5 decimal digits. All subsequent decimals are ignored.
-
-
Method Details
-
getTableName
Returns the name of the table.- Returns:
- the name of the table.
-
getColumnName
Returns the name of the column.- Returns:
- the name of the column.
-
getToleratedDelta
Returns the tolerated delta.- Returns:
- the tolerated delta.
-
matches
Checks whether or not thetableNameand thecolumnNamematch the ones of this object.- Parameters:
tableName- the table name to check.columnName- the column name to check.- Returns:
trueif both given values match those of this object.
-
toString
-