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.
  • Constructor Details

    • ToleratedDelta

      public ToleratedDelta(String tableName, String columnName, double toleratedDelta)
      Parameters:
      tableName - The name of the table
      columnName - The name of the column for which the tolerated delta should be applied
      toleratedDelta - 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)
      Parameters:
      tableName - The name of the table
      columnName - The name of the column for which the tolerated delta should be applied
      toleratedDelta - 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)
      Parameters:
      tableName - The name of the table
      columnName - The name of the column for which the tolerated delta should be applied
      toleratedDelta - 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.
    • ToleratedDelta

      public ToleratedDelta(String tableName, String columnName, ToleratedDeltaMap.Precision toleratedDelta)
      Parameters:
      tableName - The name of the table
      columnName - The name of the column for which the tolerated delta should be applied
      toleratedDelta - 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

      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