T - actual list row classpublic class ListRowComparator<T extends ListRow> extends Object implements Comparator<T>, Comparable<ListRowComparator<T>>
| Modifier and Type | Class and Description |
|---|---|
static class |
ListRowComparator.Sorting
Enumerates sort direction.
|
| Constructor and Description |
|---|
ListRowComparator(DialogObjectConstant column,
int initialPriority)
Creates a new ListRowComparator that will use values in the specified
column when comparing rows.
|
ListRowComparator(DialogObjectConstant column,
int initialPriority,
ListRowComparator.Sorting sortDirection)
Creates a new ListRowComparator that will use values in the specified
column when comparing rows.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compare(T o1,
T o2) |
int |
compareTo(ListRowComparator<T> o) |
boolean |
equals(Object obj) |
DialogObjectConstant |
getColumn()
Get the column used when comparing rows.
|
ListRowComparator.Sorting |
getSorting()
Get the sorting used when comparing list rows.
|
int |
hashCode() |
void |
setSorting(ListRowComparator.Sorting sortDirection)
Set the sorting uses when comparing list rows.
|
void |
toggleSorting()
Toggles the sorting used when comparing list rows.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic ListRowComparator(DialogObjectConstant column, int initialPriority)
Comparable interface.column - column used when comparing rowsinitialPriority - the initial priority of this list row comparatorIllegalArgumentException - if column does not contain a Comparable attribute
typepublic ListRowComparator(DialogObjectConstant column, int initialPriority, ListRowComparator.Sorting sortDirection)
Comparable interface.column - column used when comparing rowsinitialPriority - the initial priority of this list row comparatorsortDirection - the initial sort direction of this list row comparatorIllegalArgumentException - if column does not contain a Comparable attribute
typepublic void toggleSorting()
getSorting()public ListRowComparator.Sorting getSorting()
public void setSorting(ListRowComparator.Sorting sortDirection)
sortDirection - the sort directionpublic DialogObjectConstant getColumn()
public int compare(T o1, T o2)
compare in interface Comparator<T extends ListRow>public boolean equals(Object obj)
public int compareTo(ListRowComparator<T> o)
compareTo in interface Comparable<ListRowComparator<T extends ListRow>>Copyright © 2006–2020 Esito AS. All rights reserved.