/*
- * Sone - Client.java - Copyright © 2010–2013 David Roden
+ * Sone - Client.java - Copyright © 2010–2020 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
package net.pterodactylus.sone.data;
+import static com.google.common.base.Objects.equal;
+
+import com.google.common.base.Objects;
+
/**
* Container for the client information of a {@link Sone}.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
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());
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hashCode(name, version);
+ }
+
+ @Override
+ public String toString() {
+ return name + " " + version;
+ }
+
}