|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcorny.addressbook.data.Group
public class Group
Data model class for contact groups vended from the Mac OS X address book. Implements methods to modify the Group content of Apple's Address Book directly.
| Constructor Summary | |
|---|---|
Group(java.util.List<?> rawContent,
java.util.Map<java.lang.String,Record> persons)
Creates a new Group from the raw data provided by the native Code. |
|
Group(java.util.List<Contact> members)
Constructor for the "Everyone"-Group |
|
Group(java.lang.String name,
java.lang.String uid)
Creates a new, empty Group. |
|
| Method Summary | |
|---|---|
boolean |
addRecord(Record newMember)
Adds a new Record to this Group. |
int |
compareTo(Group o)
Compares the name of this Group to the name of another Group |
boolean |
equals(java.lang.Object o)
|
java.util.Set<Contact> |
getMembers()
Returns the members of this Group. |
java.lang.String |
getName()
|
java.util.Set<Group> |
getParentGroups()
Returns the parent Groups of this Group. |
java.util.Set<Group> |
getSubGroups()
Returns the subgroups of this Group. |
java.lang.String |
getUID()
|
void |
initializeWith(Record o)
Re-Initialized a Record with the data of another Record. |
boolean |
isEveryoneGroup()
|
boolean |
isSmartGroup()
|
java.util.Iterator<Contact> |
iterator()
|
boolean |
removeRecord(Record recordToRemove)
Removes a Record from this Group. |
boolean |
setName(java.lang.String name)
Changes the Name of this Group. |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Group(java.util.List<?> rawContent,
java.util.Map<java.lang.String,Record> persons)
rawContent - Data provided by the native Codepersons - Map containing all Personspublic Group(java.util.List<Contact> members)
members - All Contacts
public Group(java.lang.String name,
java.lang.String uid)
name - Name of the new Groupuid - UID of the new GroupNativeAddressBook.addGroup(String, Group)| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String getUID()
getUID in interface Recordpublic boolean isSmartGroup()
public java.util.Set<Contact> getMembers()
public java.util.Set<Group> getSubGroups()
public java.util.Set<Group> getParentGroups()
getParentGroups in interface Recordpublic boolean isEveryoneGroup()
public boolean setName(java.lang.String name)
name - New name of this Group
public boolean addRecord(Record newMember)
newMember - New member of this Group
public boolean removeRecord(Record recordToRemove)
recordToRemove - Record to remove
public int compareTo(Group o)
compareTo in interface java.lang.Comparable<Group>public java.util.Iterator<Contact> iterator()
iterator in interface java.lang.Iterable<Contact>public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic void initializeWith(Record o)
Record
initializeWith in interface Recordo - Record to take data from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||