Scott ganyo wrote:

I don't buy it. HashSet is but one implementation of a Set. By choosing the HashSet implementation you are not only tying the class to a hash-based implementation, you are trying the interface to *that specific* hash-based implementation or it's subclasses. In the end, either you buy the concept of the interface and its abstraction or you don't. I firmly believe in using interfaces as they were intended to be used.

An interface isn't just the concept of a Java interface but ALSO the implied and required semantics.

TreeSet, etc are too slow to be used with the StopFitler thus we should prevent their use.

We require HashSet/Map...

Scott

P.S. In fact, HashSet isn't always going to be the most efficient anyway. Just for one example: Consider possible implementations if I have only 1 or 2 entries.

HashSet is not always the most efficient... if you need to do runtime inserts and bulk removal TreeSet/Map might be more efficient. Also if you need to sort the map then you're stuck with a tree.

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to