Re: ObjectUtils.compare

2009-08-11 Thread Antony Riley
My motivation for the addition was for exactly one reason, writing null safe comparators. The facility exists already in collections via ComparatorUtils.nullLowComparator(Comparator c) ComparatorUtils.nullHighComparator(Comparator c) I just failed to find it. -Antony On Tue, Aug 11, 2009 at 9:

Re: ObjectUtils.compare

2009-08-10 Thread Henri Yandell
Maybe something for the CompareUtils class proposed in LANG-483: http://issues.apache.org/jira/browse/LANG-483 I'd prefer compareNullFirst, compareNullLast instead of the boolean param. Hen On Mon, Aug 10, 2009 at 5:23 AM, Antony Riley wrote: > Maybe I'm missing something obvious but commons

ObjectUtils.compare

2009-08-10 Thread Antony Riley
Maybe I'm missing something obvious but commons lang does not seem to provide a null safe compare method for comparable objects. My apologies if this functionality exists somewhere in commons lang and I'm being brain dead with regards to locating it. It seems like a really obvious addition, code