Path: csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Joshua Cranmer Newsgroups: comp.lang.java.programmer Subject: Re: Need clarification on Object.equals. Date: Wed, 19 Dec 2012 09:27:30 -0600 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: <909022a2-ead4-45e6-9f43-79b5013e04ee@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 19 Dec 2012 15:27:35 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="5a9707252ba5efb9bece56d1f4656a90"; logging-data="22805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18G3mFtdqtCoMvdyM4AIsnP9Mi42nd7jBU=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: Cancel-Lock: sha1:cjnQ23tKJsWhVobR2f8340PMJj0= Xref: csiph.com comp.lang.java.programmer:20534 On 12/18/2012 2:14 PM, plewto@gmail.com wrote: > Yes I understand that. In fact, as I pointed out in a subsequent > post, none of my code defines equals, Node was however extending > AbstractSet which does redefine it. Really All I was looking for was > a general direction I might look and not to burden anyone with large > blocks of code. Node is 212 lines, Gate is 67, Monitor another 85, > none of which even once mentions the word "equals" Your original post gave no indication that Node inherited from AbstractSet. Actually, you gave no indication of any inheritance structure, etc. The only way we could know what the problem was would be to either read your mind or to give a general, vague answer. Providing sufficient information to mention this would have precluded the whole debate. That's why there's so much emphasis on the SSCCEs (short, self-contained, compilable code examples) in this newsgroup: if you can minimize the problem down to a self-contained solution that is small enough to include in a post, it gives all the information we need. And, often times, just trying to minimize it may lead you to the answer without needing to ask the question in the first place. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth