public class DynamicCollectionComparator<T> extends Object implements Comparator<T>, Serializable
| Modifier and Type | Class and Description | 
|---|---|
| static class  | DynamicCollectionComparator.SortOrderenumerate the valid values of sort order | 
| Modifier and Type | Method and Description | 
|---|---|
| int | compare(T object0,
              T object1)compare the two given objects for order. | 
| int | compare(T object0,
              T object1,
              String fieldName)compare the two given objects for order. | 
| int | getSortOrderAsNumber()convert the sort order as an interger. | 
| static <C> void | sort(List<C> list,
        DynamicCollectionComparator.SortOrder sortOrder,
        String... fieldNames)sort the given collection ordered by the given field name | 
| static <C> void | sort(List<C> list,
        String... fieldNames)sort the given collection ordered by the given field name. | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitequalspublic static <C> void sort(List<C> list, String... fieldNames)
list - the given collection that needs to be sortedfieldName - the field name ordered bypublic static <C> void sort(List<C> list, DynamicCollectionComparator.SortOrder sortOrder, String... fieldNames)
list - the given collection that needs to be sortedfieldName - the field name ordered bysortOrder - the given sort order, either ascending or descendingpublic int compare(T object0, T object1)
compare in interface Comparator<T>public int compare(T object0, T object1, String fieldName)
public int getSortOrderAsNumber()
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.