edu.jhu.cs.oose.group3.intelligentbook.model
Class ContactGroup

java.lang.Object
  extended by edu.jhu.cs.oose.group3.intelligentbook.model.ContactGroup
All Implemented Interfaces:
java.lang.Comparable<ContactGroup>
Direct Known Subclasses:
AutomaticGroup, EnumeratedGroup

public abstract class ContactGroup
extends java.lang.Object
implements java.lang.Comparable<ContactGroup>

Represents a group of contacts This group is associated with and maintained by a particular user


Field Summary
(package private)  long groupId
           
protected  java.lang.String name
           
 
Constructor Summary
ContactGroup()
           
 
Method Summary
 int compareTo(ContactGroup g)
           
abstract  java.util.Set<Contact> getAllContacts()
          Return a set of all contacts in the group
 java.lang.String getGroupName()
           
abstract  boolean hasContact(Contact c)
          Returns whether or not the specified contact is in the group
 void setGroupName(java.lang.String name)
          The user can rename a group
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupId

long groupId

name

protected java.lang.String name
Constructor Detail

ContactGroup

public ContactGroup()
Method Detail

getGroupName

public java.lang.String getGroupName()

compareTo

public int compareTo(ContactGroup g)
Specified by:
compareTo in interface java.lang.Comparable<ContactGroup>

setGroupName

public void setGroupName(java.lang.String name)
The user can rename a group


hasContact

public abstract boolean hasContact(Contact c)
Returns whether or not the specified contact is in the group


getAllContacts

public abstract java.util.Set<Contact> getAllContacts()
Return a set of all contacts in the group