com.im.ijc.core.api.util
Class SharedDFItemComparator<T extends DFItem>
java.lang.Object
com.im.ijc.core.api.util.SharedDFItemComparator<T>
- All Implemented Interfaces:
- Comparator<T>
public final class SharedDFItemComparator<T extends DFItem>
- extends Object
- implements Comparator<T>
This Comparator orders DFItems as follows:
- Unsharable items, and sharable items that belong to the current user
- Items grouped by the owner user
Each group will be ordered according to the order of group's items as returned
by DIF APIs.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SharedDFItemComparator
public SharedDFItemComparator(List<T> originalOrder,
DFItem el)
- Creates a Comparator, which consults the originalOrder of items. The
current user is taken from the
DFSchema which is the parent of
the DFItem el.
- Parameters:
originalOrder - The original orderel - The schema component.
SharedDFItemComparator
public SharedDFItemComparator(List<T> originalOrder,
String currentUser)
getCurrentUser
public String getCurrentUser()
compare
public int compare(T o1,
T o2)
- Specified by:
compare in interface Comparator<T extends DFItem>