com.webmethods.caf.faces.data.dir
Class DirectorySearchProvider.PrincipalSortComparator
java.lang.Object
com.webmethods.caf.faces.data.dir.DirectorySearchProvider.PrincipalSortComparator
- All Implemented Interfaces:
- Comparator
- Enclosing class:
- DirectorySearchProvider
protected class DirectorySearchProvider.PrincipalSortComparator
- extends Object
- implements Comparator
comparator that simply reverses the result of a standard compare (for descending key sorts)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectorySearchProvider.PrincipalSortComparator
public DirectorySearchProvider.PrincipalSortComparator(String sortProperty,
boolean ascendingSort)
- Construct a class to contain the sort property and sort direction.
- Parameters:
sortProperty
- The value expression to sort by.ascendingSort
- The direction to sort. True to sort ascending. False to sort descending.
compare
public int compare(Object o1,
Object o2)
- Compares its two arguments for order.
- Specified by:
compare
in interface Comparator
- Returns:
- A negative integer, zero, or a positive integer as the first
argument is less than, equal to, or greater than the second.
- See Also:
Comparator.compare(Object, Object)