Package org.dbunit.dataset
Class SortedTable.AbstractRowComparator
java.lang.Object
org.dbunit.dataset.SortedTable.AbstractRowComparator
- All Implemented Interfaces:
Comparator
- Direct Known Subclasses:
SortedTable.RowComparator,SortedTable.RowComparatorByString
- Enclosing class:
SortedTable
Abstract class for sorting the table rows of a given table in a specific
order
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
AbstractRowComparator
- Parameters:
table- The wrapped table to be sortedsortColumns- The columns to be used for sorting in the given order
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator
-
compare
protected abstract int compare(Column column, Object value1, Object value2) throws TypeCastException - Parameters:
column- The column to be comparedvalue1- The first value of the given columnvalue2- The second value of the given column- Returns:
- 0 if both values are considered equal.
- Throws:
TypeCastException
-