I see your question.. If there is no Comparator passed in then the ComparableComparator is used.. The reason I was getting weird results was that for the method getPrimaryKey() in my objects, there where two matching methods, one that returned String objects, the other returned BigDecimal objects.. However BeanComparator (via PropertyUtils) was returning the String version.. So the comparision was "2" versus "22", not 2 versus 22 etc...
Eric -----Original Message----- From: Henri Yandell [mailto:[EMAIL PROTECTED]] Sent: Monday, June 10, 2002 5:44 PM To: Jakarta Commons Developers List Subject: RE: [COLLECTIONS/BEANUTILS] Is there a comparator that can dynamically pick a method to call on a bean? On Mon, 10 Jun 2002, Eric Pugh wrote: > The other reason, and why I started down this path was the original big > decimals: 2, 12, and 22, when compared as strings come out as 12, 2, 22! I still don't get this. Why are they compared as strings?? Is it if a Comparator isn't passed in the constructor? Why not ComparableComparator? Hen -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
