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.msk.conditions
Class AndCondition

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.msk.conditions.AndCondition

All Implemented Interfaces:
  Initializable, Condition, ToggleElement

    public class AndCondition

extends Object
implements Condition, Initializable, ToggleElement

Represents a condition that checks if all conditions of a given list applies.

Constructor Summary
`AndCondition(Condition... condList)` Constructs a new and condition using the list of conditions `condList`.

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.
`Condition[]` | `getConditions()` Returns the associated list of conditions.
`void` | `init()` Calls `stop()`, then calls `init` for each initializable condition associated with this object.
`boolean` | `isStarted()` Determines if the element is enabled or disabled.
`void` | `start()` Calls `start` for each associated condition implementing the `ToggleElement` interface.
`void` | `stop()` Calls `stop` for each associated condition implementing the `ToggleElement` interface.

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

Constructor Detail

### AndCondition

    public AndCondition(Condition... condList)

  Constructs a new and condition using the list of conditions `condList`.

  Parameters:
    `condList` - the list of conditions to check.

Method Detail

### getConditions

    public Condition[] getConditions()

  Returns the associated list of conditions.

### 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.

### 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()

  Calls `start` for each associated condition implementing the `ToggleElement` interface.

  Specified by:
    `start` in interface `ToggleElement`

### stop

    public void stop()

  Calls `stop` for each associated condition implementing the `ToggleElement` interface.

  Specified by:
    `stop` in interface `ToggleElement`

### init

    public void init()

  Calls `stop()`, then calls `init` for each initializable condition associated with this object.

  Specified by:
    `init` in interface `Initializable`

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.