Absolutely right! I started using a Map because I thought I would need to compare the stored Class somewhere. However, then I only needed to use the class name but did never remember turning the Map into a Set. I also like better the "cachedClassNames" name. Have fun, Paulo > -----Original Message----- > From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, September 11, 2001 12:55 AM > To: [EMAIL PROTECTED] > Subject: Re: cvs > commit:jakarta-velocity/src/java/org/apache/velocity/util/introspectionC > lassMap.java Introspector.java > > > On 9/10/01 6:09 AM, "Attila Szegedi" <[EMAIL PROTECTED]> wrote: > > > "Map classByName" could as well be "Set cachedClassNames", storing only > > class names and using "cachedClassNames.contains(className)" instead of > > "classByName.get(name) != null". It can be somewhat confusing to code > > readers why do we store the class beside its name - we don't > use the stored > > class object anywhere. > > That's a good idea too... > > Lets beat on this a while first, then we can nip and tuck. > > geir > -- > Geir Magnusson Jr. [EMAIL PROTECTED] > System and Software Consulting > Developing for the web? See http://jakarta.apache.org/velocity/ > If you look up, there are no limits - Japanese Proverb >
