Re: [lang] ComparatorChain redesign

2011-08-27 Thread James Ring
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

Re: [lang] ComparatorChain redesign

2011-08-26 Thread Henri Yandell
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

Re: [lang] ComparatorChain redesign

2011-08-26 Thread James Ring
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

[lang] ComparatorChain redesign

2011-08-26 Thread Henri Yandell
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