Package nl.tudelft.simulation.dsol.tutorial.section43

# Class PredatorPreyModel.SkipEventProducer

java.lang.Object
org.djutils.event.EventProducer
nl.tudelft.simulation.dsol.tutorial.section43.PredatorPreyModel.SkipEventProducer

All Implemented Interfaces:
  `Serializable`, `EventListener`, `org.djutils.event.EventListenerInterface`, `org.djutils.event.EventProducerInterface`

Enclosing class:
  PredatorPreyModel

    static class PredatorPreyModel.SkipEventProducer
    extends org.djutils.event.EventProducer
    implements org.djutils.event.EventListenerInterface

small event producer that fires events for the graph with a lower resolution.

## Field Summary

### 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
--- | ---
`SkipEventProducer​(int skip)` |

## Method Summary

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

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

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

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

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

## Constructor Details

### SkipEventProducer

SkipEventProducer​(int skip)

Parameters:
  `skip` - the "mod" factor used. When skip = 10, one in 10 events will be re-fired.

## Method Details

### notify

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

Specified by:
  `notify` in interface `org.djutils.event.EventListenerInterface`
Throws:
  `RemoteException`

### getSourceId

public Serializable getSourceId()

Specified by:
  `getSourceId` in interface `org.djutils.event.EventProducerInterface`
Specified by:
  `getSourceId` in class `org.djutils.event.EventProducer`