| java.lang.Object org.sakaiproject.content.impl.ContentHostingComparator
ContentHostingComparator | public class ContentHostingComparator implements Comparator(Code) | |
ContentHostingComparator can be used to sort stuff (collections, resources) from the content hosting service.
|
Field Summary | |
boolean | m_ascending true if the sort is to be ascending (false for descending). | String | m_property The property name used for the sort. |
m_ascending | boolean m_ascending(Code) | | true if the sort is to be ascending (false for descending).
|
m_property | String m_property(Code) | | The property name used for the sort.
|
ContentHostingComparator | public ContentHostingComparator(String property, boolean ascending)(Code) | | Construct.
Parameters: property - The property name used for the sort. Parameters: asc - true if the sort is to be ascending (false for descending). |
compare | public int compare(Object o1, Object o2)(Code) | | Compare these objects based on my property and ascending settings. Collections sort lower than Resources.
Parameters: o1 - The first object, ContentCollection or ContentResource Parameters: o2 - The second object, ContentCollection or ContentResource The compare result: -1 if o1 < o2, 0 if they are equal, and 1 if o1 > o2 |
|
|