org.dbunit.dataset
Class SortedTable.AbstractRowComparator
java.lang.Object
org.dbunit.dataset.SortedTable.AbstractRowComparator
- All Implemented Interfaces:
- java.util.Comparator
- Direct Known Subclasses:
- SortedTable.RowComparator, SortedTable.RowComparatorByString
- Enclosing class:
- SortedTable
protected abstract static class SortedTable.AbstractRowComparator
- extends java.lang.Object
- implements java.util.Comparator
Abstract class for sorting the table rows of a given table in a specific order
|
Method Summary |
protected abstract int |
compare(Column column,
java.lang.Object value1,
java.lang.Object value2)
|
int |
compare(java.lang.Object o1,
java.lang.Object o2)
|
| 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 |
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(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare in interface java.util.Comparator
compare
protected abstract int compare(Column column,
java.lang.Object value1,
java.lang.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-2008. All Rights Reserved.