ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.msk.conditions
Class StatCondition

java.lang.Object
  extended by umontreal.iro.lecuyer.contactcenters.msk.conditions.StatCondition
All Implemented Interfaces:
Initializable, Condition, ToggleElement

public class StatCondition
extends Object
implements Condition, Initializable, ToggleElement

Represents a condition on statistics observed during a given number of periods preceding the times at which the condition is checked.


Constructor Summary
StatCondition(CallCenter cc, StatConditionParams par)
          Constructs a new condition on statistics based on a call center model cc, and parameters par.
 
Method Summary
 boolean applies(Contact contact)
          Checks the represented condition for the given contact contact, and returns true if and only if the condition applies.
 void init()
          Initializes this object.
 boolean isStarted()
          Determines if the element is enabled or disabled.
 void start()
          Enables the element represented by this object.
 void stop()
          Disables the element represented by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatCondition

public StatCondition(CallCenter cc,
                     StatConditionParams par)
Constructs a new condition on statistics based on a call center model cc, and parameters par.

Method Detail

applies

public boolean applies(Contact contact)
Description copied from interface: Condition
Checks the represented condition for the given contact contact, and returns true if and only if the condition applies. Some conditions depend on the state of the system rather than a particular contact. In such cases, the contact object can be ignored.

Specified by:
applies in interface Condition
Parameters:
contact - the contact on which to check the condition.
Returns:
the success indicator of the test.

init

public void init()
Description copied from interface: Initializable
Initializes this object.

Specified by:
init in interface Initializable

isStarted

public boolean isStarted()
Description copied from interface: ToggleElement
Determines if the element is enabled or disabled. Returns true if the element is enabled, false otherwise.

Specified by:
isStarted in interface ToggleElement
Returns:
the current state of the element.

start

public void start()
Description copied from interface: ToggleElement
Enables the element represented by this object. This method throws an IllegalStateException if the element is already enabled.

Specified by:
start in interface ToggleElement

stop

public void stop()
Description copied from interface: ToggleElement
Disables the element represented by this object. This method throws an IllegalStateException if the element is already disabled.

Specified by:
stop in interface ToggleElement

ContactCenters
V. 0.9.9.

To submit a bug or ask questions, send an e-mail to Richard Simard.