com.jalios.util
Class DateComparator<T>
java.lang.Object
  
com.jalios.util.DateComparator<T>
- Type Parameters:
 T - With the main implementation, T must be a sub class of java.util.Date
- All Implemented Interfaces: 
 - Comparator<T>
 
- Direct Known Subclasses: 
 - DateDescendingComparator
 
public class DateComparator<T>
- extends Object
- implements Comparator<T>
  
This class implements a Comparator which compares two
 Date objects in the ascending order.
- Version:
 
  - $Revision: 23896 $
 
- Author:
 
  - Olivier Jaquemet 
 
- See Also:
 Comparator
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
REVISION
public static final String REVISION
- See Also:
 - Constant Field Values
 
DateComparator
public DateComparator()
compare
public int compare(T o1,
                   T o2)
- Specified by:
 compare in interface Comparator<T>
 
 
compareDate
public static int compareDate(Date d1,
                              Date d2)
- Compares two Dates in ascending order.
 
- Parameters:
 d1 - the first dated2 - the second date
- Returns:
 - -1, 0 or 1 if d1 is lower than, equals or greater than d2
 
 
 
Copyright © 2001-2010 Jalios SA. All Rights Reserved.