org.dbunit.dataset.datatype
Class ToleratedDeltaMap.ToleratedDelta
java.lang.Object
org.dbunit.dataset.datatype.ToleratedDeltaMap.ToleratedDelta
- Enclosing class:
- ToleratedDeltaMap
public static class ToleratedDeltaMap.ToleratedDelta
- extends Object
Simple bean that holds the tolerance for floating point comparisons for a specific
database column.
ToleratedDeltaMap.ToleratedDelta
public ToleratedDeltaMap.ToleratedDelta(String tableName,
String columnName,
double toleratedDelta)
- 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.
ToleratedDeltaMap.ToleratedDelta
public ToleratedDeltaMap.ToleratedDelta(String tableName,
String columnName,
BigDecimal toleratedDelta)
- 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.
ToleratedDeltaMap.ToleratedDelta
public ToleratedDeltaMap.ToleratedDelta(String tableName,
String columnName,
BigDecimal toleratedDelta,
boolean isPercentage)
- 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. See ToleratedDeltaMap.Precision
for more.
ToleratedDeltaMap.ToleratedDelta
public ToleratedDeltaMap.ToleratedDelta(String tableName,
String columnName,
ToleratedDeltaMap.Precision toleratedDelta)
- 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.
getTableName
public String getTableName()
getColumnName
public String getColumnName()
getToleratedDelta
public ToleratedDeltaMap.Precision getToleratedDelta()
matches
public boolean matches(String tableName,
String columnName)
- Checks whether or not the
tableName
and the columnName
match the ones of this object.
- Parameters:
tableName
- columnName
-
- Returns:
true
if both given values match those of this object.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2002-2012. All Rights Reserved.