From 35ab9f054ccfcc01c5a3b12b433b539c0450fe38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 20 Jul 2015 06:53:51 +0200 Subject: [PATCH] Override hashCode() --- src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java | 7 +++++++ 1 file changed, 7 insertions(+) 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..9a70a14 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java +++ b/src/main/java/net/pterodactylus/sone/freenet/wot/Trust.java @@ -19,6 +19,8 @@ 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. * @@ -90,6 +92,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() { -- 2.7.4