|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectesmska.data.Contacts
public class Contacts
Class managing all program contacts
Field Summary | |
---|---|
static int |
ACTION_ADD_CONTACT
new contact added |
static int |
ACTION_CHANGE_CONTACT
properties of some contact changed |
static int |
ACTION_CLEAR_CONTACTS
all contacts removed |
static int |
ACTION_REMOVE_CONTACT
existing contact removed |
Method Summary | |
---|---|
boolean |
add(Contact contact)
Add new contact |
void |
addActionListener(java.awt.event.ActionListener actionListener)
|
boolean |
addAll(java.util.Collection<Contact> contacts)
Add new contacts |
void |
clear()
Remove all contacts |
boolean |
contains(Contact contact)
Search for an existing contact |
java.util.SortedSet<Contact> |
getAll()
Get unmodifiable collection of all contacts sorted by name |
static Contacts |
getInstance()
Get shared instance |
boolean |
isEmpty()
Return if there are no contacts |
boolean |
remove(Contact contact)
Remove existing contact |
void |
removeActionListener(java.awt.event.ActionListener actionListener)
|
boolean |
removeAll(java.util.Collection<Contact> contacts)
Remove existing contacts |
int |
size()
Return number of contacts |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ACTION_ADD_CONTACT
public static final int ACTION_REMOVE_CONTACT
public static final int ACTION_CLEAR_CONTACTS
public static final int ACTION_CHANGE_CONTACT
Method Detail |
---|
public void addActionListener(java.awt.event.ActionListener actionListener)
public void removeActionListener(java.awt.event.ActionListener actionListener)
public static Contacts getInstance()
public java.util.SortedSet<Contact> getAll()
public boolean add(Contact contact)
contact
- new contact, not null
Collection.add(E)
public boolean addAll(java.util.Collection<Contact> contacts)
contacts
- collection of contacts, not null
Collection.addAll(java.util.Collection extends E>)
public boolean remove(Contact contact)
contact
- contact to be removed, not null
Collection.remove(java.lang.Object)
public boolean removeAll(java.util.Collection<Contact> contacts)
contacts
- collection of contacts to be removed, not null
Collection.removeAll(java.util.Collection>)
public void clear()
public boolean contains(Contact contact)
contact
- contact to be searched, not null
Collection.contains(java.lang.Object)
public int size()
Collection.size()
public boolean isEmpty()
Collection.isEmpty()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |