X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FTrust.java;h=2da00f61fb6ee3c39a9a5eef65837e3507a84913;hp=fe7684635d951da326e76c6d0ece21e0eb441171;hb=179e7da4d8d8a474d0b622d60b5f5d32d6ab4052;hpb=0e8f7804ce344bdd69f5ecc7febe25a60a53561d diff --git a/src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java b/src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java index fe76846..2da00f6 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java @@ -1,5 +1,5 @@ /* - * Sone - Trust.java - Copyright © 2010–2013 David Roden + * Sone - Trust.java - Copyright © 2010–2019 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 @@ -19,10 +19,10 @@ package net.pterodactylus.sone.freenet.wot; import static com.google.common.base.Objects.equal; +import com.google.common.base.Objects; + /** * Container class for trust in the web of trust. - * - * @author David ‘Bombe’ Roden */ public class Trust { @@ -90,6 +90,11 @@ public class Trust { return equal(getExplicit(), trust.getExplicit()) && equal(getImplicit(), trust.getImplicit()) && equal(getDistance(), trust.getDistance()); } + @Override + public int hashCode() { + return Objects.hashCode(explicit, implicit, distance); + } + /** {@inheritDoc} */ @Override public String toString() {