summaryrefslogtreecommitdiff
path: root/src/Q1/AddressBook.java
diff options
context:
space:
mode:
authormokha <mokha@cisco.com>2019-05-07 09:07:51 -0600
committermokha <mokha@cisco.com>2019-05-07 09:07:51 -0600
commit44d424d22ddcd267dc5d4612f028f7aa4fb4fab3 (patch)
tree67106800d6587b8c44a6b369930c40a1a1c78f28 /src/Q1/AddressBook.java
parent1f88dcd4120787c55933607c3280e880f5ff00db (diff)
add more documentation
Diffstat (limited to 'src/Q1/AddressBook.java')
-rw-r--r--src/Q1/AddressBook.java24
1 files changed, 10 insertions, 14 deletions
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<AddressBook> {
}
/**
- * 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<AddressBook> {
}
/**
- * 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<AddressBook> {
}
/**
- * 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<AddressBook> {
}
/**
- * 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