Re: Need clarification on Object.equals.
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