public class RowComparator extends Object implements Comparator<TableRow>
TableRow.| Modifier and Type | Class and Description |
|---|---|
static class |
RowComparator.Direction |
| Constructor and Description |
|---|
RowComparator(String colId,
RowComparator.Direction dir)
Constructs a comparator for table rows that uses the given
column ID and direction.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(TableRow a,
TableRow b) |
static RowComparator.Direction |
direction(String s)
Returns the sort direction constant for the given string.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic static final String DESC_STR
public RowComparator(String colId, RowComparator.Direction dir)
colId - the column to sort ondir - the direction to sort inpublic int compare(TableRow a, TableRow b)
compare in interface Comparator<TableRow>public static RowComparator.Direction direction(String s)
s - the direction as a stringCopyright © 2015. All rights reserved.