Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters
Class ContactCenter

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.ContactCenter

    public class ContactCenter

extends Object

Defines utility methods for contact center simulation. This class provides facilities to initialize the contact center's objects, and to perform some actions on a group of objects.

Method Summary
`static void` | `clearWaitingQueues(Iterable<? extends WaitingQueue> waitingQueues, int dqType)` Clears all waiting queues enumerated by the iterable `waitingQueues` with dequeue type `dqType`.
`static void` | `clearWaitingQueues(WaitingQueue[] waitingQueues, int dqType)` Clears all waiting queues in `waitingQueues` with dequeue type `dqType`.
`static void` | `clearWaitingQueues(WaitingQueueSet[] waitingQueues, int dqType)` Clears all waiting queues in `waitingQueues` with dequeue type `dqType`.
`static void` | `initElements(Initializable[] el)` Initializes all elements in `el`.
`static void` | `initElements(Iterable<?> el)` Initializes all elements enumerated by the iterable `el`.
`static void` | `initElements(ListOfStatProbes<?>[] el)` Initializes all elements in `el`.
`static void` | `initElements(MatrixOfStatProbes<?>[] el)` Initializes all elements in `el`.
`static void` | `initElements(MeasureMatrix[] el)` Initializes all elements in `el`.
`static void` | `initElements(Object[] el)` Equivalent to `initElements(Iterable)` for an array of objects.
`static void` | `initElements(StatProbe[] el)` Initializes all elements in `el`.
`static void` | `startPeriodChangeEvents(Iterable<? extends PeriodChangeEvent> pce)` For each period-change event enumerated by the iterable `pce`, calls the `PeriodChangeEvent.start()` method.
`static void` | `startPeriodChangeEvents(PeriodChangeEvent[] pce)` For each period-change event in the array `pce`, calls the `PeriodChangeEvent.start()` method.
`static void` | `stopPeriodChangeEvents(Iterable<? extends PeriodChangeEvent> pce)` For each period-change event enumerated by the iterable `pce`, calls the `PeriodChangeEvent.stop()` method.
`static void` | `stopPeriodChangeEvents(PeriodChangeEvent[] pce)` For each period-change event in the array `pce`, calls the `PeriodChangeEvent.stop()` method.
`static void` | `toggleElements(Iterable<? extends ToggleElement> el, boolean enabled)` Toggles the elements to the status `enabled`.
`static void` | `toggleElements(ToggleElement[] el, boolean enabled)` Toggles the elements to the status `enabled`.
`static String` | `toShortString(Named named)` Returns a short string representation of the named object `named`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### initElements

    public static void initElements(Iterable<?> el)

  Initializes all elements enumerated by the iterable `el`. This method calls the `init` method of any iterated object which is an instance of `Initializable`, `MeasureMatrix`, `ListOfStatProbes`, and `MatrixOfStatProbes`. For other elements instance of `Iterable`, this method is called recursively.

### initElements

    public static void initElements(Object[] el)

  Equivalent to `initElements(Iterable)` for an array of objects.

  Parameters:
    `el` - the array of elements.

### initElements

    public static void initElements(Initializable[] el)

  Initializes all elements in `el`. For each `Initializable` object in the array, calls the `Initializable.init()` method.

### initElements

    public static void initElements(MeasureMatrix[] el)

  Initializes all elements in `el`. For each `MeasureMatrix` object in the array, calls the `MeasureMatrix.init()` method.

### initElements

    public static void initElements(StatProbe[] el)

  Initializes all elements in `el`. For each `StatProbe` object in the array, calls the `StatProbe.init()` method.

### initElements

    public static void initElements(ListOfStatProbes<?>[] el)

  Initializes all elements in `el`. For each `ListOfStatProbes` object in the array, calls the `ListOfStatProbes.init()` method.

### initElements

    public static void initElements(MatrixOfStatProbes<?>[] el)

  Initializes all elements in `el`. For each `MatrixOfStatProbes` object in the array, calls the `MatrixOfStatProbes.init()` method.

### toggleElements

    public static void toggleElements(Iterable<? extends ToggleElement> el,
                                      boolean enabled)

  Toggles the elements to the status `enabled`. For each `ToggleElement` object enumerated by the iterable `el`, calls the `ToggleElement.start()` or `ToggleElement.stop()` methods.

  Parameters:
    `el` - the list of toggle elements.
    `enabled` - `true` if the toggle elements are enabled, `false` if they are disabled.

### toggleElements

    public static void toggleElements(ToggleElement[] el,
                                      boolean enabled)

  Toggles the elements to the status `enabled`. For each `ToggleElement` object in the array `el`, calls the `ToggleElement.start()` or `ToggleElement.stop()` methods.

  Parameters:
    `el` - the array of toggle elements.
    `enabled` - `true` if the toggle elements are enabled, `false` if they are disabled.

### startPeriodChangeEvents

    public static void startPeriodChangeEvents(Iterable<? extends PeriodChangeEvent> pce)

  For each period-change event enumerated by the iterable `pce`, calls the `PeriodChangeEvent.start()` method.

  Parameters:
    `pce` - the list of period-change events.

### startPeriodChangeEvents

    public static void startPeriodChangeEvents(PeriodChangeEvent[] pce)

  For each period-change event in the array `pce`, calls the `PeriodChangeEvent.start()` method.

  Parameters:
    `pce` - the array of period-change events.

### stopPeriodChangeEvents

    public static void stopPeriodChangeEvents(Iterable<? extends PeriodChangeEvent> pce)

  For each period-change event enumerated by the iterable `pce`, calls the `PeriodChangeEvent.stop()` method.

  Parameters:
    `pce` - the list of period-change events.

### stopPeriodChangeEvents

    public static void stopPeriodChangeEvents(PeriodChangeEvent[] pce)

  For each period-change event in the array `pce`, calls the `PeriodChangeEvent.stop()` method.

  Parameters:
    `pce` - the array of period-change events.

### clearWaitingQueues

    public static void clearWaitingQueues(Iterable<? extends WaitingQueue> waitingQueues,
                                          int dqType)

  Clears all waiting queues enumerated by the iterable `waitingQueues` with dequeue type `dqType`. For each `WaitingQueue` object in the list, calls the `WaitingQueue.clear()` method with the given `dqType`.

  Parameters:
    `waitingQueues` - the list of waiting queues.
    `dqType` - the dequeue type being used.
  Throws:
    `NullPointerException` - if the given list is `null`.

### clearWaitingQueues

    public static void clearWaitingQueues(WaitingQueue[] waitingQueues,
                                          int dqType)

  Clears all waiting queues in `waitingQueues` with dequeue type `dqType`. For each `WaitingQueue` object in the array, calls the `WaitingQueue.clear()` method with the given `dqType`.

  Parameters:
    `waitingQueues` - the array of waiting queues.
    `dqType` - the dequeue type being used.
  Throws:
    `NullPointerException` - if the given list is `null`.

### clearWaitingQueues

    public static void clearWaitingQueues(WaitingQueueSet[] waitingQueues,
                                          int dqType)

  Clears all waiting queues in `waitingQueues` with dequeue type `dqType`. For each `WaitingQueueSet` object in the array, clears all registered waiting queues with the given `dqType`.

  Parameters:
    `waitingQueues` - the array of waiting queues.
    `dqType` - the dequeue type being used.
  Throws:
    `NullPointerException` - if the given list is `null`.

### toShortString

    public static String toShortString(Named named)

  Returns a short string representation of the named object `named`. If the length of `named.``getName()` is greater than 0, returns that name. Otherwise, this returns the result of the `toString` method defined in `Object`.

  Returns:
    a short string representation of the named object.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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