org.directwebremoting.datasync
Class SortCriteriaComparator<T>
java.lang.Object
org.directwebremoting.datasync.SortCriteriaComparator<T>
- All Implemented Interfaces:
- java.util.Comparator<T>
public class SortCriteriaComparator<T>
- extends java.lang.Object
- implements java.util.Comparator<T>
A Comparator that uses a list of SortCriterion to decide
how to sort the beans. Values to sort by are extracted using an implementation
of AttributeValueExtractor,.
- Author:
- Joe Walker [joe at getahead dot ltd dot uk]
|
Method Summary |
int |
compare(T object1,
T object2)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
SortCriteriaComparator
public SortCriteriaComparator(java.util.List<SortCriterion> sort,
ComparatorFactory<T> comparatorFactory)
- All SortCriteriaComparators need a set of things to sort on and a way to
get the values to sort
compare
public int compare(T object1,
T object2)
- Specified by:
compare in interface java.util.Comparator<T>