From ff0c3f0b989f35a3cbd2c21cd29603d614485f9d Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Tue, 15 Nov 2022 15:51:22 +0100 Subject: [PATCH] Exclude time from hash --- app/src/main/java/ch/nuth/zhaw/exbox/MyCompetitor.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/main/java/ch/nuth/zhaw/exbox/MyCompetitor.java b/app/src/main/java/ch/nuth/zhaw/exbox/MyCompetitor.java index 021838e..59b954f 100644 --- a/app/src/main/java/ch/nuth/zhaw/exbox/MyCompetitor.java +++ b/app/src/main/java/ch/nuth/zhaw/exbox/MyCompetitor.java @@ -62,12 +62,9 @@ public class MyCompetitor implements Comparable { @Override public int hashCode() { - int hashCode = 1; - hashCode *= 13; + int hashCode = 13; hashCode += name.hashCode(); hashCode *= 17; - hashCode += time.hashCode(); - hashCode *= 31; return hashCode + rank; }