net.wimpi.pim.contact.db
Interface ContactGroup

All Superinterfaces:
Identifiable
All Known Implementing Classes:
ContactCollectionImpl.ContactGroupImpl

public interface ContactGroup
extends Identifiable

An interface modeling a contact group.

Version:
0.1 (22/07/2003)
Author:
Dieter Wimberger

Method Summary
 void addContact(Contact contact)
          Adds a contact to this ContactGroup.
 boolean contains(Contact contact)
          Tests if this ContactGroup contains a given contact.
 boolean contains(java.lang.String UID)
          Tests if this ContactGroup contains a given contact.
 java.util.Iterator getContacts()
          Returns all contacts associated with this ContactGroup.
 java.lang.String getDescription()
          Returns the description of this ContactGroup.
 java.lang.String getName()
          Returns the name of this ContactGroup.
 Contact[] listContacts()
          Returns all contacts associated with this ContactGroup.
 void removeContact(Contact contact)
          Removes a contact from this ContactGroup.
 void setDescription(java.lang.String description)
          Sets the description of this ContactGroup.
 void setName(java.lang.String name)
          Sets the name of this ContactGroup.
 int size()
          Returns the number of contacts in this ContactGroup.
 
Methods inherited from interface net.wimpi.pim.util.Identifiable
getUID
 

Method Detail

getName

public java.lang.String getName()
Returns the name of this ContactGroup.

Returns:
the name as String.

setName

public void setName(java.lang.String name)
Sets the name of this ContactGroup.

Parameters:
name - the name as String.

getContacts

public java.util.Iterator getContacts()
Returns all contacts associated with this ContactGroup.

Returns:
an Iterator over all Contact instances.

listContacts

public Contact[] listContacts()
Returns all contacts associated with this ContactGroup.

Returns:
an array of Contact instances.

addContact

public void addContact(Contact contact)
Adds a contact to this ContactGroup.

Parameters:
contact - the contact to be added as Contact.

removeContact

public void removeContact(Contact contact)
Removes a contact from this ContactGroup.

Parameters:
contact - the contact to be removed from this ContactGroup.

contains

public boolean contains(java.lang.String UID)
Tests if this ContactGroup contains a given contact.

Parameters:
UID - the unique identifier of the contact as String.
Returns:
true if contains contact, false otherwise.

contains

public boolean contains(Contact contact)
Tests if this ContactGroup contains a given contact.

Parameters:
contact - the contact as Contact.
Returns:
true if contains contact, false otherwise.

size

public int size()
Returns the number of contacts in this ContactGroup.

Returns:
the number of contacts as int.

getDescription

public java.lang.String getDescription()
Returns the description of this ContactGroup.

Returns:
the description as String.

setDescription

public void setDescription(java.lang.String description)
Sets the description of this ContactGroup.

Parameters:
description - the description as String.


Copyright © 2001-2003 jpim team.