Page 1 of 1

SerialDate should implement Comparable interface

Posted: Thu Sep 04, 2003 6:36 pm
by wildepete
Just a suggestion that it would be handy if SerialDate implemented the java.util.Comparable interface. No additional methods need to me implemented.

This interface only has one method which SerialDate already has: int compareTo()

This would make it a little easier to use the sorting algorithms that use the comparable interface. As it is, you have to roll your own Comparator, which granted is very easy, but it would be even easier if you didn't have to do this at all.

Posted: Fri Sep 05, 2003 1:53 pm
by david.gilbert
Thanks for the suggestion. I've added this for the next release (0.8.7).

Regards,

Dave