|
From: Oliver H. <Ol...@ou...> - 2005-07-22 08:48:51
|
Ahhh.... Don't these really belong in ComparableComparator? Given that they would mostly compare Comparables? To be honest I wouldn't even think to look in NullSafeComparator for a ComparableComparator. But I can live with it ;-) Thanks, Ollie > -----Original Message----- > From: spr...@li...=20 > [mailto:spr...@li...] > On Behalf Of Juergen Hoeller > Sent: Friday, 22 July 2005 6:12 PM > To: spr...@li... > Subject: Re: [Springframework-developer] Comparator singletons MIA? >=20 > NullSafeComparator has two such singletons: NULLS_LOW and=20 > NULLS_HIGH, each using a ComparableComparator underneath. I=20 > guess you could simply use those singletons rather than one=20 > on ComparableComparator itself. >=20 > Juergen > =20 >=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...] > On Behalf Of Oliver Hutchison > Sent: Friday, July 22, 2005 4:22 AM > To: spr...@li... > Subject: RE: [Springframework-developer] Comparator singletons MIA? >=20 > Actually I see this is only the case for ComparableComparator=20 > (I've got to many versions of the code open at the moment)=20 > the NullSafeComparator and BooleanComparator singletons are=20 > still there.=20 >=20 > My question still stands through.=20 >=20 > Oliver >=20 > > -----Original Message----- > > From: spr...@li... > > [mailto:spr...@li...] > > On Behalf Of Oliver Hutchison > > Sent: Friday, 22 July 2005 10:32 AM > > To: spr...@li... > > Subject: [Springframework-developer] Comparator singletons MIA? > >=20 > > Jurgen, > >=20 > > I've just started upgrading Spring Rich to the latest=20 > spring code base=20 > > and noticed that all of the Comparator singletons (which=20 > Spring Rich=20 > > uses a lot) in the o.s.util.comparator package have been removed. > >=20 > > These classes are IMHO perfect examples of where you should=20 > be using a=20 > > singleton. Given that every instance will exhibit exactly the same=20 > > behaviour, why would you ever want to have more that one=20 > instance of a=20 > > class like ComparableComparator? > > Also how much cleaner is this: > >=20 > > ComparableComparator.nullSafeInstance().compare(argument1,=20 > argument2) > >=20 > > to this? > >=20 > > new NullSafeComparator(new ComparableComparator(),=20 > > true).compare(argument1, argument2) > >=20 > > and more performant to boot. > >=20 > > Anyway, obviously I can live without them, but I'm curious=20 > about the=20 > > rational behind the removal? > >=20 > > Thanks, > >=20 > > Oliver > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies=20 > > from IBM. Find simple to follow Roadmaps, straightforward articles,=20 > > informative Webcasts and more! Get everything you need to get up to=20 > > speed, fast. > > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > > _______________________________________________ > > Springframework-developer mailing list=20 > > Spr...@li... > >=20 > https://lists.sourceforge.net/lists/listinfo/springframework-developer > >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast. > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 >=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |