net.coderazzi.filters.parser
Class DateComparator
java.lang.Object
net.coderazzi.filters.parser.DateComparator
- All Implemented Interfaces:
- Comparator<Date>
public abstract class DateComparator
- extends Object
- implements Comparator<Date>
Class to deduce a sensible Comparator
for Date
instances.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateComparator
public DateComparator()
getDateComparator
public static DateComparator getDateComparator(Format dateFormat)
- Factory constructor, returning an instance suitable for the given format.
compare
public int compare(Date o1,
Date o2)
- Specified by:
compare
in interface Comparator<Date>
diff
public abstract long diff(Date o1,
Date o2)