nl.tudelft.simulation.examples.dsol.terminal

## Class Ship

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

All Implemented Interfaces:
  Serializable, EventProducerInterface

    public class Ship
    extends EventProducer

copyright (c) 2002-2018 Delft University of Technology.
BSD-style license. See DSOL License.

Version:
  Jul 25, 2018
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 nl.tudelft.simulation.event.EventProducer

`listeners`

### Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface

`FIRST_POSITION, LAST_POSITION`

### Constructor Summary

Constructors
Constructor and Description
`Ship(int capacity)`

### Method Summary

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

### Methods inherited from class nl.tudelft.simulation.event.EventProducer

`addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, 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` - the ship's capacity

### Method Detail

#### incContainers

    public void incContainers()

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

#### getContainers

    public final int getContainers()

Returns:
  containers