On Mar 10, 2004, at 2:59 PM, Kevin A. Burton wrote:
I refuse to expose HashSet... sorry! :) But I did wrap what is passed in, like above, in a HashSet in my latest commit.

Hm... You're doing this EVEN if the caller passes a HashSet directly?!

Well it was in the ctor. But I guess I'm not seeing all the times the filter is being constructed to make this a cause a performance hit.


Why do you have a problem exposing a HashSet/Map... it SHOULD be a Hash based implementation. Doing anything else is just wrong and would seriously slow down Lucene indexing.

Just semantically, it is a "set" of stop words - so in theory it shouldn't matter the actual implementation. I'm an interface purist at heart.


Also... you're HashSet constructor has to copy values from the original HashSet into the new HashSet ... not very clean and this can just be removed by forcing the caller to use a HashSet (which they should).

I've caved in and gone HashSet all the way.


Erik


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to