X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FClient.java;h=ad094f25f22b146bc6c59f321b1a1d653613f91b;hp=93b8dbf1bcc84f63f3ff29f738cb5c0e63089c87;hb=0e8f7804ce344bdd69f5ecc7febe25a60a53561d;hpb=a47643aed43d118ca68044f95451bb5374cdb332 diff --git a/src/main/java/net/pterodactylus/sone/data/Client.java b/src/main/java/net/pterodactylus/sone/data/Client.java index 93b8dbf..ad094f2 100644 --- a/src/main/java/net/pterodactylus/sone/data/Client.java +++ b/src/main/java/net/pterodactylus/sone/data/Client.java @@ -1,5 +1,5 @@ /* - * Sone - Client.java - Copyright © 2010–2012 David Roden + * Sone - Client.java - Copyright © 2010–2013 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,8 @@ package net.pterodactylus.sone.data; +import static com.google.common.base.Objects.equal; + /** * Container for the client information of a {@link Sone}. * @@ -65,4 +67,13 @@ public class Client { return version; } + @Override + public boolean equals(Object object) { + if (!(object instanceof Client)) { + return false; + } + Client client = (Client) object; + return equal(getName(), client.getName()) && equal(getVersion(), client.getVersion()); + } + }