com.webmethods.caf.faces.data.dir
Class DirectorySearchProvider.PrincipalSortComparator

java.lang.Object
  extended by 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)


Constructor Summary
DirectorySearchProvider.PrincipalSortComparator(String sortProperty, boolean ascendingSort)
          Construct a class to contain the sort property and sort direction.
 
Method Summary
 int compare(Object o1, Object o2)
          Compares its two arguments for order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

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.
Method Detail

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)