From: Roland Häder Date: Sun, 12 Nov 2017 22:03:02 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b50b791444446de97ef229fdf67124b1a48c719e;p=jcontacts-business-core.git Continued: - also compare company name as 2 companies may be headed in same building Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java index e9ade40..9f7d03a 100644 --- a/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java +++ b/src/org/mxchange/jcontactsbusiness/model/headquarter/Headquarters.java @@ -56,7 +56,10 @@ public class Headquarters implements Serializable { boolean isSameAddress = true; // Compare both addresses - if (!Objects.equals(headquarter1.getHeadquarterCountry(), headquarter2.getHeadquarterCountry())) { + if (!Objects.equals(headquarter1.getHeadquarterCompanyName(), headquarter2.getHeadquarterCompanyName())) { + // Not the same + isSameAddress = false; + } else if (!Objects.equals(headquarter1.getHeadquarterCountry(), headquarter2.getHeadquarterCountry())) { // Not the same isSameAddress = false; } else if (!Objects.equals(headquarter1.getHeadquarterCity(), headquarter2.getHeadquarterCity())) {