From: David ‘Bombe’ Roden Date: Wed, 13 Oct 2010 17:39:10 +0000 (+0200) Subject: Override Object.equals(). X-Git-Tag: 0.1-RC1~456 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8d8182f05bd30c3f4d3e12b5df06b18451fe1472;p=Sone.git Override Object.equals(). --- diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index bb36a9c..b5e3b08 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -204,4 +204,15 @@ public class Sone { return id.hashCode(); } + /** + * {@inheritDoc} + */ + @Override + public boolean equals(Object object) { + if (!(object instanceof Sone)) { + return false; + } + return ((Sone) object).id.equals(id); + } + }