From 8d8182f05bd30c3f4d3e12b5df06b18451fe1472 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 13 Oct 2010 19:39:10 +0200 Subject: [PATCH] Override Object.equals(). --- src/main/java/net/pterodactylus/sone/data/Sone.java | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); + } + } -- 2.7.4