Package nl.tudelft.simulation.examples.dsol.timesharedcomputer

# Class Computer.ExitCounter

java.lang.Object
org.djutils.event.EventProducer
org.djutils.stats.summarizers.event.EventBasedCounter
nl.tudelft.simulation.dsol.statistics.SimCounter<Double,​Double,​SimTimeDouble>
nl.tudelft.simulation.examples.dsol.timesharedcomputer.Computer.ExitCounter

All Implemented Interfaces:
  `Serializable`, `EventListener`, `StatisticsInterface<Double,​Double,​SimTimeDouble>`, `org.djutils.event.EventListenerInterface`, `org.djutils.event.EventProducerInterface`, `org.djutils.stats.summarizers.CounterInterface`

Enclosing class:
  Computer

    public static class Computer.ExitCounter
    extends SimCounter<Double,​Double,​SimTimeDouble>

A counter which stops after a predifined number of jobs.

See Also:
  Serialized Form

## Nested Class Summary

## Nested classes/interfaces inherited from class nl.tudelft.simulation.dsol.statistics.SimCounter

`SimCounter.CalendarDouble, SimCounter.CalendarFloat, SimCounter.CalendarLong, SimCounter.TimeDouble, SimCounter.TimeDoubleUnit, SimCounter.TimeFloat, SimCounter.TimeFloatUnit, SimCounter.TimeLong`

## Field Summary

### Fields inherited from class nl.tudelft.simulation.dsol.statistics.SimCounter

`TIMED_INITIALIZED_EVENT, TIMED_OBSERVATION_ADDED_EVENT`

### Fields inherited from class org.djutils.event.EventProducer

`eventProducerImpl`

### Fields inherited from interface org.djutils.event.EventProducerInterface

`FIRST_POSITION, LAST_POSITION`

## Constructor Summary

Constructors
Constructor | Description
--- | ---
`ExitCounter​(String description, SimulatorInterface.TimeDouble simulator)` | constructs a new ExitCounter.

## Method Summary

Modifier and Type | Method | Description
--- | --- | ---
`void` | `notify​(org.djutils.event.EventInterface event)`

### Methods inherited from class nl.tudelft.simulation.dsol.statistics.SimCounter

`endOfReplication, getSimulator, ingest, initialize`

### Methods inherited from class org.djutils.stats.summarizers.event.EventBasedCounter

`fireEvents, getCount, getDescription, getN, getSourceId, toString`

### Methods inherited from class org.djutils.event.EventProducer

`addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListener`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### ExitCounter

public ExitCounter​(String description, SimulatorInterface.TimeDouble simulator) throws RemoteException
constructs a new ExitCounter.

Parameters:
  `description` - String; the description of the counter
  `simulator` - SimulatorInterface.TimeDouble; the simulator
Throws:
  `RemoteException` - on network failure

## Method Details

### notify

public void notify​(org.djutils.event.EventInterface event)

Specified by:
  `notify` in interface `org.djutils.event.EventListenerInterface`
Overrides:
  `notify` in class `SimCounter<Double,​Double,​SimTimeDouble>`