@Status(stage=PRODUCTION, unitTests=COMPLETE) @Reviews(value=@Review(at="2010-07-01",by="Kees Schotanus",reason="Initial review")) public final class SelectItemComparator extends Object implements Comparator<javax.faces.model.SelectItem>, Serializable
SelectItem
.
SelectItem
.Modifier and Type | Field and Description |
---|---|
static SelectItemComparator |
SELECTITEM_COMPARATOR_ASCENDING
Comparator that sorts the SelectItems ascending.
|
static SelectItemComparator |
SELECTITEM_COMPARATOR_DESCENDING
Comparator that sorts the SelectItems descending.
|
Modifier and Type | Method and Description |
---|---|
int |
compare(javax.faces.model.SelectItem left,
javax.faces.model.SelectItem right)
Compares the supplied
SelectItems on their labels
(ignoring case), taking the sort order into account. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public static final SelectItemComparator SELECTITEM_COMPARATOR_DESCENDING
public static final SelectItemComparator SELECTITEM_COMPARATOR_ASCENDING
public int compare(javax.faces.model.SelectItem left, javax.faces.model.SelectItem right)
SelectItems
on their labels
(ignoring case), taking the sort order into account.compare
in interface Comparator<javax.faces.model.SelectItem>
left
- The left SelectItem.right
- The right SelectItem.NullPointerException
- When either the supplied left or right
SelectItem is null or the label of the supplied left or right SelectItem
is null.Comparator.compare(Object, Object)
Copyright © 2008–2018. All rights reserved.