Override Object.equals().
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 17:39:10 +0000 (19:39 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 13 Oct 2010 17:39:10 +0000 (19:39 +0200)
src/main/java/net/pterodactylus/sone/data/Sone.java

index bb36a9c..b5e3b08 100644 (file)
@@ -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);
+       }
+
 }