Package nl.tudelft.simulation.examples.dsol.terminal

## Class Ship

- java.lang.Object
- - org.djutils.event.EventProducer
  - - nl.tudelft.simulation.examples.dsol.terminal.Ship

All Implemented Interfaces:
  `Serializable`, `EventProducerInterface`

    public class Ship
    extends EventProducer

Copyright (c) 2002-2022 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://simulation.tudelft.nl/dsol/3.0/license.html.

Author:
  Peter Jacobs, Alexander Verbraeck
See Also:
  Serialized Form

### Field Summary

Fields
`static EventType` `SHIP_FULL_EVENT` the ship-full 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
`Ship​(int capacity)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getContainers()`
`Serializable` `getSourceId()`
`void` `incContainers()` increase the number of containers and fire an event when full.

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

### Field Detail

#### SHIP_FULL_EVENT

    public static final EventType SHIP_FULL_EVENT

the ship-full event.

### Constructor Detail

#### Ship

    public Ship​(int capacity)

Parameters:
  `capacity` - int; the ship's capacity

### Method Detail

#### incContainers

    public void incContainers()

increase the number of containers and fire an event when full.

#### getContainers

    public int getContainers()

Returns:
  containers

#### getSourceId

    public Serializable getSourceId()

Specified by:
  `getSourceId` in interface `EventProducerInterface`
Specified by:
  `getSourceId` in class `EventProducer`