Hey Henri,
On Fri, Aug 26, 2011 at 11:50 PM, Henri Yandell wrote:
> Thanks James.
>
> I wanted to pull the comparator classes over from Collections as I
> wanted to still be able to support them (and use internally as I
> already had ComparableComparator hidden away) without having to deal
> with
Thanks James.
I wanted to pull the comparator classes over from Collections as I
wanted to still be able to support them (and use internally as I
already had ComparableComparator hidden away) without having to deal
with all of Collections.
Maybe the answer though is to ignore them in favour of Or
Google Guava has Ordering:
http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/Ordering.html
It is an incredibly useful class. Some random example of how it's awesome:
http://www.polygenelubricants.com/2010/10/elegant-comparison-logic-with-guava.html
Recommend that
Looking at the Collections ComparatorChain class, I think it's overcomplicated.
The current API is:
public class ComparatorChain implements Comparator, Serializable {
public ComparatorChain() {
public ComparatorChain(Comparator comparator) {
public ComparatorChain(Comparator comparato