{"action":"created","issue":{"url":"https://api.github.com/repos/DataSketches/memory/issues/41","repository_url":"https://api.github.com/repos/DataSketches/memory","labels_url":"https://api.github.com/repos/DataSketches/memory/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/DataSketches/memory/issues/41/comments","events_url":"https://api.github.com/repos/DataSketches/memory/issues/41/events","html_url":"https://github.com/DataSketches/memory/issues/41","id":300232928,"number":41,"title":"Memory.equalTo() must be equals() (i. e. override java.lang.Object's method)","user":{"login":"leventov","id":609240,"avatar_url":"https://avatars0.githubusercontent.com/u/609240?v=4","gravatar_id":"","url":"https://api.github.com/users/leventov","html_url":"https://github.com/leventov","followers_url":"https://api.github.com/users/leventov/followers","following_url":"https://api.github.com/users/leventov/following{/other_user}","gists_url":"https://api.github.com/users/leventov/gists{/gist_id}","starred_url":"https://api.github.com/users/leventov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leventov/subscriptions","organizations_url":"https://api.github.com/users/leventov/orgs","repos_url":"https://api.github.com/users/leventov/repos","events_url":"https://api.github.com/users/leventov/events{/privacy}","received_events_url":"https://api.github.com/users/leventov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-26T13:10:03Z","updated_at":"2018-02-26T19:04:33Z","closed_at":null,"author_association":"COLLABORATOR","body":"The similarity of those methods and easiness of confusion mandates that there shouldn't be a separate `equalTo()` method, it should just override `equals()`. I. e. the same as in ByteBuffer."},"comment":{"url":"https://api.github.com/repos/DataSketches/memory/issues/comments/368612102","html_url":"https://github.com/DataSketches/memory/issues/41#issuecomment-368612102","issue_url":"https://api.github.com/repos/DataSketches/memory/issues/41","id":368612102,"user":{"login":"leerho","id":12941506,"avatar_url":"https://avatars1.githubusercontent.com/u/12941506?v=4","gravatar_id":"","url":"https://api.github.com/users/leerho","html_url":"https://github.com/leerho","followers_url":"https://api.github.com/users/leerho/followers","following_url":"https://api.github.com/users/leerho/following{/other_user}","gists_url":"https://api.github.com/users/leerho/gists{/gist_id}","starred_url":"https://api.github.com/users/leerho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leerho/subscriptions","organizations_url":"https://api.github.com/users/leerho/orgs","repos_url":"https://api.github.com/users/leerho/repos","events_url":"https://api.github.com/users/leerho/events{/privacy}","received_events_url":"https://api.github.com/users/leerho/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T19:04:33Z","updated_at":"2018-02-26T19:04:33Z","author_association":"CONTRIBUTOR","body":"These have different names so that equals() and hashCode() can be consistent for hash tables.  The contract for hashCode() states that \"equal objects must have equal hash codes\".  If we impose the equalTo() logic onto equals(), then we are obligated to override hashCode().  Then hash table lookups would be painfully slow especially for writable objects that may constantly change their underlying data.  \r\n\r\nThe intent of equalTo() is to compare the underlying data, independent of whether the holding object is the same or not.  If you like, we could change the name to \"equalDataTo()\".  \r\n\r\nAnother example is if X is on-heap and Y is off-heap, it is very useful to check if in fact they have the same data content. But they are very different objects.\r\n\r\n"}}
{"actor":{"display_login":"leerho"}}