|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.dialer.InfiniteDialerList
public class InfiniteDialerList
Implements the DialerList
interface for an infinite
dialer list whose elements are produced using a contact
factory. This list can be used when there is
no defined model for the calls made by the dialer.
Constructor Summary | |
---|---|
InfiniteDialerList(ContactFactory factory)
Constructs a new infinite dialer list whose contacts are instantiated using the contact factory factory. |
Method Summary | |
---|---|
void |
clear()
Clears the contents of this dialer list. |
ContactFactory |
getContactFactory()
Returns the contact factory associated with this dialer list. |
Contact |
newInstance()
Constructs and returns a new Contact object. |
Contact |
removeFirst(int[] contactTypes)
Removes and returns the first contact with one of the desired types from the dialer list. |
void |
setContactFactory(ContactFactory factory)
Sets the contact factory used to instantiate contacts to factory. |
int |
size(int[] contactTypes)
Returns the number of contacts of desired types stored into this dialer list. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InfiniteDialerList(ContactFactory factory)
factory
- the contact factory used to instantiate contacts.
NullPointerException
- if factory is null.Method Detail |
---|
public ContactFactory getContactFactory()
public void setContactFactory(ContactFactory factory)
factory
- the new contact factory.
NullPointerException
- if factory is null.public int size(int[] contactTypes)
DialerList
Integer.MAX_VALUE
.
If the dialer list does not allow restriction to
specific contact types, this method throws
an UnsupportedOperationException
.
size
in interface DialerList
contactTypes
- the array of desired contact types.
public Contact removeFirst(int[] contactTypes)
DialerList
NoSuchElementException
.
If contactTypes is null,
any contact type is allowed.
If contactTypes is non-null while
the dialer list does not support restrictions to
specific contact types, this throws an
UnsupportedOperationException
.
removeFirst
in interface DialerList
contactTypes
- the array of desired contact types.
public Contact newInstance()
ContactFactory
Contact
object.
If a contact cannot be instantiated, a
ContactInstantiationException
is thrown.
newInstance
in interface ContactFactory
public String toString()
toString
in class Object
public void clear()
DialerList
clear
in interface DialerList
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |