| java.lang.Object org.zkoss.zul.ListitemComparator
ListitemComparator | public class ListitemComparator implements Comparator(Code) | | A comparator used to compare
Listitem , if not live data,
or the data themselves, if live data.
author: tomyeh |
Constructor Summary | |
public | ListitemComparator() Compares with
Listitem.getValue . | public | ListitemComparator(int index) Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
Note: It assumes the ascending order, case-insensitive and
comparing the returned values of
Listcell.getLabel .
If not, use
ListitemComparator.ListitemComparator(int,boolean,boolean,boolean) instead.
A null value is considered as the minimum value.
Parameters: index - which column to compare. | public | ListitemComparator(int index, boolean ascending, boolean ignoreCase) Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
Note: it compares the returned value of
Listcell.getLabel .
If you want to compare
Listcell.getValue .,
use
ListitemComparator.ListitemComparator(int,boolean,boolean,boolean) instead.
A null value is considered as the minimum value.
Parameters: index - which column to compare. | public | ListitemComparator(int index, boolean ascending, boolean ignoreCase, boolean byValue) Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
A null value is considered as the minimum value.
Parameters: index - which column to compare. | public | ListitemComparator(int index, boolean ascending, boolean ignoreCase, boolean byValue, boolean nullAsMax) Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
Parameters: index - which column to compare. | public | ListitemComparator(Listheader header, boolean ascending, boolean ignoreCase) Compares with the column which the list header is at. | public | ListitemComparator(Listheader header, boolean ascending, boolean ignoreCase, boolean byValue) Compares with the column which the list header is at. | public | ListitemComparator(Listheader header, boolean ascending, boolean ignoreCase, boolean byValue, boolean nullAsMax) Compares with the column which the list header is at. |
ListitemComparator | public ListitemComparator(int index, boolean ascending, boolean ignoreCase)(Code) | | Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
Note: it compares the returned value of
Listcell.getLabel .
If you want to compare
Listcell.getValue .,
use
ListitemComparator.ListitemComparator(int,boolean,boolean,boolean) instead.
A null value is considered as the minimum value.
Parameters: index - which column to compare. If -1, Listitem.getValueis used. Parameters: ascending - whether to sort as ascending (or descending). Parameters: ignoreCase - whether to sort case-insensitive |
ListitemComparator | public ListitemComparator(int index, boolean ascending, boolean ignoreCase, boolean byValue)(Code) | | Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
A null value is considered as the minimum value.
Parameters: index - which column to compare. If -1, Listitem.getValueis used. Parameters: ascending - whether to sort as ascending (or descending). Parameters: ignoreCase - whether to sort case-insensitive Parameters: byValue - whether to compare Listcell.getValue.If false, it compares Listcell.getLabel.If true, it assumes the value returned by Listcell.getValueimplements Comparable.It is ignored if the index is -1. |
ListitemComparator | public ListitemComparator(int index, boolean ascending, boolean ignoreCase, boolean byValue, boolean nullAsMax)(Code) | | Compares with the column of the specified index.
0 for the first column, 1 for the second and so on
Note: -1 for
Listitem.getValue and it assumes
the value implements Comparable.
Parameters: index - which column to compare. If -1, Listitem.getValueis used. Parameters: ascending - whether to sort as ascending (or descending). Parameters: ignoreCase - whether to sort case-insensitive Parameters: byValue - whether to compare Listcell.getValue.If false, it compares Listcell.getLabel.If true, it assumes the value returned by Listcell.getValueimplements Comparable.It is ignored if the index is -1. Parameters: nullAsMax - whether to consider null as the maximum value.If false, null is considered as the minimum value. |
ListitemComparator | public ListitemComparator(Listheader header, boolean ascending, boolean ignoreCase, boolean byValue)(Code) | | Compares with the column which the list header is at.
A null value is considered as the minimum value.
Parameters: ascending - whether to sort as ascending (or descending). Parameters: ignoreCase - whether to sort case-insensitive Parameters: byValue - whether to compare Listcell.getValue.If false, it compares Listcell.getLabel. |
ListitemComparator | public ListitemComparator(Listheader header, boolean ascending, boolean ignoreCase, boolean byValue, boolean nullAsMax)(Code) | | Compares with the column which the list header is at.
Parameters: ascending - whether to sort as ascending (or descending). Parameters: ignoreCase - whether to sort case-insensitive Parameters: byValue - whether to compare Listcell.getValue.If false, it compares Listcell.getLabel. Parameters: nullAsMax - whether to consider null as the maximum value.If false, null is considered as the minimum value. |
getListheader | public Listheader getListheader()(Code) | | Returns the listheader that this comparator is associated with, or null
if not available.
|
hashCode | public int hashCode()(Code) | | |
isAscending | public boolean isAscending()(Code) | | Returns whether the order is ascending.
|
shallIgnoreCase | public boolean shallIgnoreCase()(Code) | | Returns whether to ignore case.
|
|
|