From 44d424d22ddcd267dc5d4612f028f7aa4fb4fab3 Mon Sep 17 00:00:00 2001 From: mokha Date: Tue, 7 May 2019 09:07:51 -0600 Subject: add more documentation --- src/Q1/AddressBook.java | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/Q1') diff --git a/src/Q1/AddressBook.java b/src/Q1/AddressBook.java index d08fad1..ad04a9a 100644 --- a/src/Q1/AddressBook.java +++ b/src/Q1/AddressBook.java @@ -1,6 +1,7 @@ /** - * Assignment 1, COMP268 Class: AddressBook.java Purpose: Represents a contact from an address book. + * Assignment 1, COMP268 Class: AddressBook.java * + * @description Represents a contact from an address book. * @author: mo khan Student ID: 3431709 * @date May 6, 2019 * @version 1.0 @@ -268,10 +269,9 @@ public class AddressBook implements Comparable { } /** - * Compares name1 with name2 and returns a string representation. - * Returns a negative value if name1 is less than name2. - * Returns a positive value if name1 is greater than name2. - * Returns a zero if name1 is equal to name2. + * Compares name1 with name2 and returns a string representation. Returns a negative value if + * name1 is less than name2. Returns a positive value if name1 is greater than name2. Returns a + * zero if name1 is equal to name2. * * @param name1 first name * @param name2 second name @@ -282,10 +282,9 @@ public class AddressBook implements Comparable { } /** - * Compares one address book with another. - * Returns a negative value if this is less than other. - * Returns a positive value if this is greater than other. - * Returns a zero if this is equal to other. + * Compares one address book with another. Returns a negative value if this is less than other. + * Returns a positive value if this is greater than other. Returns a zero if this is equal to + * other. * * @param other The other address book to compare to. */ @@ -296,11 +295,9 @@ public class AddressBook implements Comparable { } /** - * Overrides equals to check for value equality instead of - * reference equality. + * Overrides equals to check for value equality instead of reference equality. * * @param o The other item to check against. - * * @return true if values match, otherwise false. */ @Override @@ -321,8 +318,7 @@ public class AddressBook implements Comparable { } /** - * Overrides hashCode to ensure instances that are - * equal by value equate to the same hash code for + * Overrides hashCode to ensure instances that are equal by value equate to the same hash code for * hash key computations. * * @return The hash code -- cgit v1.2.3