org.dbunit.dataset
Class SortedTable.RowComparatorByString

java.lang.Object
  extended by org.dbunit.dataset.SortedTable.AbstractRowComparator
      extended by org.dbunit.dataset.SortedTable.RowComparatorByString
All Implemented Interfaces:
java.util.Comparator
Enclosing class:
SortedTable

protected static class SortedTable.RowComparatorByString
extends SortedTable.AbstractRowComparator

Compares the rows with each other in order to sort them in the correct order using the string value of both values for the comparison.


Constructor Summary
SortedTable.RowComparatorByString(ITable table, Column[] sortColumns)
           
 
Method Summary
protected  int compare(Column column, java.lang.Object value1, java.lang.Object value2)
           
 
Methods inherited from class org.dbunit.dataset.SortedTable.AbstractRowComparator
compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

SortedTable.RowComparatorByString

public SortedTable.RowComparatorByString(ITable table,
                                         Column[] sortColumns)
Method Detail

compare

protected int compare(Column column,
                      java.lang.Object value1,
                      java.lang.Object value2)
               throws TypeCastException
Specified by:
compare in class SortedTable.AbstractRowComparator
Parameters:
column - The column to be compared
value1 - The first value of the given column
value2 - The second value of the given column
Returns:
0 if both values are considered equal.
Throws:
TypeCastException


Copyright © 2002-2008. All Rights Reserved.