{"id":380,"date":"2003-05-08T23:49:33","date_gmt":"2003-05-09T03:49:33","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=380"},"modified":"2003-05-08T23:49:33","modified_gmt":"2003-05-09T03:49:33","slug":"overriding-the-equals-method","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2003\/05\/08\/overriding-the-equals-method\/","title":{"rendered":"Overriding the equals() method"},"content":{"rendered":"<p>I was looking for any best practices related to overriding the equals() method in objects and came across <a href=\"javapractices.com\">javapractices.com<\/a>, which has a section devoted to the equals() method: <a href=\"http:\/\/www.javapractices.com\/Topic17.cjp\">Implementing equals<\/a>.  This article doesn&#8217;t really answer the question of &#8220;when&#8221; you override the method, although from other reading I can surmise that you do so whenever you think you or someone else may need to use the object as a key in a hashtable.  Any other opinions as to the &#8220;when&#8221; of overriding the equals() method?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was looking for any best practices related to overriding the equals() method in objects and came across javapractices.com, which has a section devoted to the equals() method: Implementing equals. This article doesn&#8217;t really answer the question of &#8220;when&#8221; you override the method, although from other reading I can surmise that you do so whenever &hellip; <a href=\"https:\/\/cephas.net\/blog\/2003\/05\/08\/overriding-the-equals-method\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Overriding the equals() method<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/380"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=380"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/380\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=380"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=380"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=380"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}