public class SortOrder
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
SortOrder.Comparator<T>
This is an extension of the Java class
Comparator, which provides
access to the sort order, which is implemented by the comparator object. |
static class |
SortOrder.Order
An enumeration describing the supported sorting of objects in the data model.
|
| Constructor and Description |
|---|
SortOrder() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compare(java.lang.String a,
java.lang.String b,
SortOrder.Order sortOrder)
Compare two String objects with given sort order.
|
static SortOrder.Comparator<java.lang.String> |
createComparatorString(SortOrder.Order sortOrder)
A comparator for sorting String objects is created and returned.
|
public static int compare(java.lang.String a,
java.lang.String b,
SortOrder.Order sortOrder)
a - The first operand.b - The second operand.sortOrder - The sort order to apply.Collections.sort(java.util.List<T>).public static SortOrder.Comparator<java.lang.String> createComparatorString(SortOrder.Order sortOrder)
sortOrder - The comparator will support the given sort order. The following sort orders are
supported:SortOrder.Order for additional details.