Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: hashCode Date: Wed, 29 Aug 2012 11:51:49 -0700 Organization: A noiseless patient Spider Lines: 13 Message-ID: References: <563f186a-edb3-4311-ae48-3af7decfce2c@googlegroups.com> <6ac6c252-c370-4f74-b29d-ce5368019977@googlegroups.com> <502598d0$0$287$14726298@news.sunsite.dk> <5028191b$0$290$14726298@news.sunsite.dk> <50317b03$0$281$14726298@news.sunsite.dk> <503bfd0f$0$282$14726298@news.sunsite.dk> <3zc%r.5945$pd4.2658@newsfe21.iad> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 29 Aug 2012 18:51:53 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="9415"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18zqQvYR885/quEBS2+jwbFYuujxJkY4eI=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: Cancel-Lock: sha1:7CEcFgtCGqZNxhmC1/4DS2g14tM= Xref: csiph.com comp.lang.java.programmer:18408 On 8/29/2012 11:06 AM, Daniel Pitts wrote: > Map map=new HashMap(new MyKeyHasher()); > Does that make more sense? I see. You're changing the specification arbitrarily to fit your needs. That wasn't what I had in mind. Sure, if you just assume you can do what you like you can re-write library code, but the idea was to hash Object, without having to supply a "MyKeyHasher".