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.server
Class AgentGroupSet

    java.lang.Object
      java.util.AbstractCollection<E>
          java.util.AbstractSet<AgentGroup>
              umontreal.iro.lecuyer.contactcenters.server.AgentGroupSet

All Implemented Interfaces:
  Cloneable, Iterable<AgentGroup>, Collection<AgentGroup>, Set<AgentGroup>, Initializable, Named

    public class AgentGroupSet

extends AbstractSet<AgentGroup>
implements Initializable, Named, Cloneable

Represents a set of agent groups for which it is possible to get the total number of members.

Constructor Summary
`AgentGroupSet()`

Method Summary
`boolean` | `add(AgentGroup group)` Adds the agent group `group` to this set of agent groups.
`void` | `clear()` Removes all the agent groups contained in this set of agent groups.
`AgentGroupSet` | `clone()`
`boolean` | `contains(Object o)`
`String` | `getName()` Returns the name associated with this object.
`int` | `getNumAgents()` Returns the total number of agents currently in the registered agent groups.
`int` | `getNumBusyAgents()` Returns the total number of busy agents currently in the set of agent groups.
`int` | `getNumFreeAgents()` Returns the total number of free agents currently in the set of agent groups.
`int` | `getNumGhostAgents()` Returns the total number of ghost agents currently in the set of agent groups.
`int` | `getNumIdleAgents()` Returns the total number of idle agents currently in the set of agent groups.
`Accumulate` | `getStatNumAgents()` Returns the statistical collector for the number of agents in the agent groups.
`Accumulate` | `getStatNumBusyAgents()` Returns the statistical collector for the number of busy agents in the agent groups.
`Accumulate` | `getStatNumFreeAgents()` Returns the statistical collector for the number of free agents in the agent groups.
`Accumulate` | `getStatNumGhostAgents()` Returns the statistical collector for the number of ghost agents in the agent groups.
`Accumulate` | `getStatNumIdleAgents()` Returns the statistical collector for the number of idle agents in the agent groups.
`void` | `init()` Initializes all the agent groups in this set of agent groups.
`void` | `initStat()` Initializes the statistical collectors for this set of agent groups.
`boolean` | `isEmpty()`
`boolean` | `isStatCollecting()` Determines if this set of agent groups is collecting statistics about the number of agents.
`Iterator<AgentGroup>` | `iterator()`
`boolean` | `remove(Object group)` Removes the agent group `group` from this set of agent groups.
`void` | `setName(String name)` Sets the name of this object to `name`.
`void` | `setStatCollecting(boolean b)` Sets the state of statistical collecting to `b`.
`void` | `setStatCollecting(Simulator sim)` Enables statistical collecting, and uses the given simulator `sim`.
`int` | `size()`
`String` | `toString()`

Methods inherited from class java.util.AbstractSet
`equals, hashCode, removeAll`

Methods inherited from class java.util.AbstractCollection
`addAll, containsAll, retainAll, toArray, toArray`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Set
`addAll, containsAll, retainAll, toArray, toArray`

Constructor Detail

### AgentGroupSet

    public AgentGroupSet()

Method Detail

### getName

    public String getName()

  Description copied from interface: `Named`
  Returns the name associated with this object. If no name was set, this must return an empty string, not `null`.

  Specified by:
    `getName` in interface `Named`
  Returns:
    the name of this object.

### setName

    public void setName(String name)

  Description copied from interface: `Named`
  Sets the name of this object to `name`. The given name cannot be `null` and the implementation can throw an `UnsupportedOperationException` if the name is read-only.

  Specified by:
    `setName` in interface `Named`
  Parameters:
    `name` - the new name of the object.

### getNumAgents

    public int getNumAgents()

  Returns the total number of agents currently in the registered agent groups.

  Returns:
    the total number of agents.

### getNumFreeAgents

    public int getNumFreeAgents()

  Returns the total number of free agents currently in the set of agent groups.

  Returns:
    the total number of free agents.

### getNumBusyAgents

    public int getNumBusyAgents()

  Returns the total number of busy agents currently in the set of agent groups.

  Returns:
    the total number of busy agents.

### getNumIdleAgents

    public int getNumIdleAgents()

  Returns the total number of idle agents currently in the set of agent groups.

  Returns:
    the total number of idle agents.

### getNumGhostAgents

    public int getNumGhostAgents()

  Returns the total number of ghost agents currently in the set of agent groups.

  Returns:
    the total number of ghost agents.

### add

    public boolean add(AgentGroup group)

  Adds the agent group `group` to this set of agent groups.

  Specified by:
    `add` in interface `Collection<AgentGroup>`
  Specified by:
    `add` in interface `Set<AgentGroup>`
  Overrides:
    `add` in class `AbstractCollection<AgentGroup>`
  Parameters:
    `group` - the agent group being added.
  Throws:
    `NullPointerException` - if `group` is `null`.

### contains

    public boolean contains(Object o)

  Specified by:
    `contains` in interface `Collection<AgentGroup>`
  Specified by:
    `contains` in interface `Set<AgentGroup>`
  Overrides:
    `contains` in class `AbstractCollection<AgentGroup>`

### size

    public int size()

  Specified by:
    `size` in interface `Collection<AgentGroup>`
  Specified by:
    `size` in interface `Set<AgentGroup>`
  Specified by:
    `size` in class `AbstractCollection<AgentGroup>`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Collection<AgentGroup>`
  Specified by:
    `isEmpty` in interface `Set<AgentGroup>`
  Overrides:
    `isEmpty` in class `AbstractCollection<AgentGroup>`

### iterator

    public Iterator<AgentGroup> iterator()

  Specified by:
    `iterator` in interface `Iterable<AgentGroup>`
  Specified by:
    `iterator` in interface `Collection<AgentGroup>`
  Specified by:
    `iterator` in interface `Set<AgentGroup>`
  Specified by:
    `iterator` in class `AbstractCollection<AgentGroup>`

### remove

    public boolean remove(Object group)

  Removes the agent group `group` from this set of agent groups.

  Specified by:
    `remove` in interface `Collection<AgentGroup>`
  Specified by:
    `remove` in interface `Set<AgentGroup>`
  Overrides:
    `remove` in class `AbstractCollection<AgentGroup>`
  Parameters:
    `group` - the agent group being removed.
  Throws:
    `NullPointerException` - if `group` is `null`.

### clear

    public void clear()

  Removes all the agent groups contained in this set of agent groups.

  Specified by:
    `clear` in interface `Collection<AgentGroup>`
  Specified by:
    `clear` in interface `Set<AgentGroup>`
  Overrides:
    `clear` in class `AbstractCollection<AgentGroup>`

### init

    public void init()

  Initializes all the agent groups in this set of agent groups.

  Specified by:
    `init` in interface `Initializable`

### initStat

    public void initStat()

  Initializes the statistical collectors for this set of agent groups. If statistical collecting is turned OFF, this throws an `IllegalStateException`.

  Throws:
    `IllegalStateException` - if statistical collecting is turned OFF.

### isStatCollecting

    public boolean isStatCollecting()

  Determines if this set of agent groups is collecting statistics about the number of agents. If this returns `true`, statistical collecting is turned ON. Otherwise (the default), it is turned OFF.

  Returns:
    the state of statistical collecting.

### setStatCollecting

    public void setStatCollecting(boolean b)

  Sets the state of statistical collecting to `b`. If `b` is `true`, statistical collecting is turned ON, and the statistical collectors are created or reinitialized. If `b` is `false`, statistical collecting is turned OFF.

  Parameters:
    `b` - the new state of statistical collecting.

### setStatCollecting

    public void setStatCollecting(Simulator sim)

  Enables statistical collecting, and uses the given simulator `sim`. The simulator is used by the internal accumulates when the simulation time is required to update probes with new values.

  Parameters:
    `sim` - the simulator attached to accumulates.

### getStatNumAgents

    public Accumulate getStatNumAgents()

  Returns the statistical collector for the number of agents in the agent groups. This returns a non-`null` value only if statistical collecting was turned ON since this object was constructed.

  Returns:
    the statistical collector for the number of agents.

### getStatNumFreeAgents

    public Accumulate getStatNumFreeAgents()

  Returns the statistical collector for the number of free agents in the agent groups. This returns a non-`null` value only if statistical collecting was turned ON since this object was constructed.

  Returns:
    the statistical collector for the number of free agents.

### getStatNumBusyAgents

    public Accumulate getStatNumBusyAgents()

  Returns the statistical collector for the number of busy agents in the agent groups. This returns a non-`null` value only if statistical collecting was turned ON since this object was constructed.

  Returns:
    the statistical collector for the number of busy agents.

### getStatNumIdleAgents

    public Accumulate getStatNumIdleAgents()

  Returns the statistical collector for the number of idle agents in the agent groups. This returns a non-`null` value only if statistical collecting was turned ON since this object was constructed.

  Returns:
    the statistical collector for the number of idle agents.

### getStatNumGhostAgents

    public Accumulate getStatNumGhostAgents()

  Returns the statistical collector for the number of ghost agents in the agent groups. This returns a non-`null` value only if statistical collecting was turned ON since this object was constructed.

  Returns:
    the statistical collector for the number of ghost agents.

### toString

    public String toString()

  Overrides:
    `toString` in class `AbstractCollection<AgentGroup>`

### clone

    public AgentGroupSet clone()

  Overrides:
    `clone` in class `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.