public class Sort extends Object
<c:forEach items="${openmrs:sort(someListObject)}" var="o" end="0">
....
....
</c:forEach>
| Constructor and Description |
|---|
Sort() |
| Modifier and Type | Method and Description |
|---|---|
static <T> List<T> |
sort(Collection<T> c)
This method will sort a collection based on the natural order of it's elements
|
static <T extends Comparable<T>> |
sort(Collection<T> c,
Boolean reverseOrder)
This method will sort a collection based on the natural order of it's elements
|
static <T> List<T> |
sort(Collection<T> c,
String sortProperty,
Boolean reverseOrder)
This method will sort a passed Collection
|
public static <T> List<T> sort(Collection<T> c)
c - public static <T extends Comparable<T>> List<T> sort(Collection<T> c, Boolean reverseOrder)
c - isDescending - public static <T> List<T> sort(Collection<T> c, String sortProperty, Boolean reverseOrder)
c: - The collection to sortsortProperty: - The javabean property to sort the elements of the Collection byisDescending: - Boolean indicating whether or not to reverse the order of the collectionCopyright © 2018 OpenMRS LLC.. All Rights Reserved.