Kevin - I've made this change and committed it, using a Set.
Let me know if there are any issues with what I've committed - I believe I've faithfully preserved backwards compatibility.
Actually... Erik.. I don't think your Hashtable constructor will work...
By default Hashtable.keySet returns a SynchronizedSet. (on JDK 1.4.2). so were're back to where we started:
public StopFilter(TokenStream in, Hashtable stopTable) {You need do make it a HashSet:
super(in);
table = stopTable.keySet();
}
table = new HashSet( stopTable.keySet() );
Also... while you're at it... the private variable name is 'table' which this HashSet certainly is *not* ;)
Probably makes sense to just call this variable 'hashset' and then force the type to be HashSet since it's necessary for this to be a HashSet to maintain any decent performance. You'll need to update your second constructor to require a HashSet too.. would be very bad to let callers use another set impl... TreeSet and SortedSet would still be too slow...
Anyway... I had this feature in my patch ;)
Thanks!
Kevin
--
Please reply using PGP.
http://peerfear.org/pubkey.asc NewsMonster - http://www.newsmonster.org/
Kevin A. Burton, Location - San Francisco, CA, Cell - 415.595.9965
AIM/YIM - sfburtonator, Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412
IRC - freenode.net #infoanarchy | #p2p-hackers | #newsmonster
begin:vcard fn:Kevin Burton n:Burton;Kevin email;internet:[EMAIL PROTECTED] x-mozilla-html:TRUE version:2.1 end:vcard
signature.asc
Description: OpenPGP digital signature
