The Artima Developer Community
Sponsored Link

Articles Forum
How to Write an Equality Method in Java

45 replies on 4 pages. Most recent reply: Feb 7, 2016 9:41 PM by Alex V

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 45 replies on 4 pages [ « | 1 2 3 4 ]
Alex V

Posts: 1
Nickname: alexv83
Registered: Feb, 2016

Re: How to Write an Equality Method in Java Posted: Feb 7, 2016 9:41 PM
Reply to this message Reply
Advertisement
about point number 3.
I think it is a very bad idea, not overriding the equals() Method.

I think the best thing to do is to understand ones you have changed the object, you have! to remove! the old one from the hash, and enter the new one. yes it might be little less efficient, but it will save you from troubles, and it is logically correct. that is my opinion.

Flat View: This topic has 45 replies on 4 pages [ « | 1  2  3  4 ]
Topic: Trip Report: Ad-Hoc Meeting on Threads in C++ Previous Topic   Next Topic Topic: The Simplest Thing That Could Possibly Work


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2017 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us