commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <bay...@generationjava.com>
Subject RE: [COLLECTIONS/BEANUTILS] Is there a comparator that can dynami cally pick a method to call on a bean?
Date Mon, 10 Jun 2002 20:56:12 GMT

> > 2) All comparisions are string comparisons..  So when I
> > compare Bigdecimals
> > 2, 12, and 22, the orders is 12, 2, 22!  Do I need to hand in
> > another class
> > to cast the objects to?

BeanComparator should have a Comparator property.

ie) I'd do:

Comparator comp = new ComparableComparator();
comp = new BeanComparator(comp);

or setComparator(..);

It's the reason why ComparableComparator exists :) So I can easily pass it
into my BeanComparator.

Hen


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message