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
protected abstract static class SortedTable.AbstractRowComparator
- extends Object
- implements Comparator
Abstract class for sorting the table rows of a given table in a specific order
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SortedTable.AbstractRowComparator
public SortedTable.AbstractRowComparator(ITable table,
Column[] sortColumns)
- Parameters:
table
- The wrapped table to be sortedsortColumns
- The columns to be used for sorting in the given order
compare
public int compare(Object o1,
Object o2)
- Specified by:
compare
in interface Comparator
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
Copyright © 2002-2012. All Rights Reserved.