Add Javadoc for hashCode and equals methods of Contact
This commit is contained in:
parent
c67a11f008
commit
51e148e2ec
@ -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); }
|
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
|
@Override
|
||||||
public int hashCode() { return Objects.hash(id); }
|
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
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
|
Reference in New Issue
Block a user