|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.deas.hyperenc.ContactList
edu.harvard.deas.hyperenc.BasicContactList
public class BasicContactList
A contact list backed by a standard List
.
Constructor Summary | |
---|---|
BasicContactList(Contact owner)
Creates a new, empty BasicContactList. |
Method Summary | |
---|---|
void |
addContact(Contact c)
Appends c to the list. |
Contact |
get(int index)
Returns the contact at index index in the list. |
Contact |
getContact(Address a)
Returns the Contact in this list with e-mail address a . |
Iterator<Contact> |
iterator()
Returns an Iterator over the Contacts in this list. |
void |
removeContact(Contact c)
Removes c from the list. |
int |
size()
Returns the number of contacts in the list. |
Methods inherited from class edu.harvard.deas.hyperenc.ContactList |
---|
isEmpty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BasicContactList(Contact owner)
owner
- the owner of this list (usually the Contact corresponding to the
user of the hyper-encryption application)Method Detail |
---|
public void addContact(Contact c)
ContactList
c
to the list.
addContact
in class ContactList
c
- the contact to be addedpublic Contact get(int index)
ContactList
index
in the list.
get
in class ContactList
index
- an integer index between 0 and this.size() - 1
public Contact getContact(Address a)
ContactList
a
.
getContact
in class ContactList
a
- e-mail address
public void removeContact(Contact c)
ContactList
c
from the list.
removeContact
in class ContactList
c
- the contact to be removedpublic int size()
ContactList
size
in class ContactList
public Iterator<Contact> iterator()
ContactList
iterator
in interface Iterable<Contact>
iterator
in class ContactList
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |