|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.deas.hyperenc.Contact
public class Contact
Represents a communication partner for hyper-encryption. Each Contact has a name and an e-mail address; each Contact should be uniquely identified by its e-mail address. That is, no two Contacts should be created with the same e-mail address.
Contacts are immutable.
Constructor Summary | |
---|---|
Contact(String fullName,
Address email,
String displayName)
Create a new Contact. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Compares this Contact to the given Object. |
String |
getDisplayName()
Returns the display name of this contact. |
Address |
getEmail()
Returns the e-mail address of this contact. |
String |
getFullName()
Returns the name of this contact. |
int |
hashCode()
|
String |
toString()
Returns a String representation of this Contact. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Contact(String fullName, Address email, String displayName)
fullName
- Full name of this contactemail
- E-mail address for this contactdisplayName
- Display name for this contactMethod Detail |
---|
public String getFullName()
public Address getEmail()
public String getDisplayName()
public String toString()
toString
in class Object
public boolean equals(Object o)
true
iff
o
is a Contact with an e-mail address equal to this Contact's
e-mail address.
equals
in class Object
public int hashCode()
hashCode
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |