From 51e148e2ec3af73a88ce0b06f9dadb09e92df4c3 Mon Sep 17 00:00:00 2001 From: kske Date: Thu, 11 Jun 2020 11:05:38 +0200 Subject: [PATCH] Add Javadoc for hashCode and equals methods of Contact --- src/main/java/envoy/data/Contact.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/envoy/data/Contact.java b/src/main/java/envoy/data/Contact.java index 4de77a0..9a5fd0a 100644 --- a/src/main/java/envoy/data/Contact.java +++ b/src/main/java/envoy/data/Contact.java @@ -62,13 +62,19 @@ public abstract class Contact implements Serializable { public String toString() { return String.format("Contact[id=%d,name=%s, contacts=%s]", id, name, contacts); } /** - * {@inheritDoc} + * Provides a hash code based on the ID of this contact. + * + * @since Envoy Common v0.1-beta */ @Override public int hashCode() { return Objects.hash(id); } /** - * {@inheritDoc} + * Tests equality to another object. If that object is a contact as well, + * equality is determined by the ID. + * + * @param obj the object to test for equality to this contact + * @return {code true} if both objects are contacts and have identical IDs */ @Override public boolean equals(Object obj) {