From: Christoph S. <ste...@eb...> - 2008-08-08 21:22:54
|
It is late and I might miss your point :-) I use the HashMap to check if a particular path is already stored, since things like "CCC" will happen very often. I guess my assumption was that doing these frequent checks in a HashMap would be much faster than checking if a list contains the the keys already. Cheers, Chris Rajarshi Guha wrote: > Hi, I was looking the code for Fingerprint and I see the following code > > Map paths = findPathes(ac, searchDepth); > > But in the code that populates the map, the key seems to be always > the same as the value: > > private void checkAndStore(List newPath, Map paths) { > ... > paths.put(storePath, storePath); > ... > } > > Is there a reason for this? Why not just employ a List? > > ------------------------------------------------------------------- > Rajarshi Guha <rg...@in...> > GPG Fingerprint: D070 5427 CC5B 7938 929C DD13 66A1 922C 51E7 9E84 > ------------------------------------------------------------------- > "whois awk?", sed Grep. > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Cdk-devel mailing list Cdk...@li... https://lists.sourceforge.net/lists/listinfo/cdk-devel -- Dr. Christoph Steinbeck Head of Chemoinformatics and Metabolism European Bioinformatics Institute (EBI) Wellcome Trust Genome Campus Hinxton, Cambridge CB10 1SD UK Phone +44 1223 49 2640 What is man but that lofty spirit - that sense of enterprise. ... Kirk, "I, Mudd," stardate 4513.3.. |