gui
Class Ship

java.lang.Object
  extended bygui.Ship
All Implemented Interfaces:
java.io.Serializable

public class Ship
extends java.lang.Object
implements java.io.Serializable

Ship-object A ship-object is instanciated with it's static variables. A ship-object has several get- and set methods to take care of dynamic variables.

See Also:
Serialized Form

Constructor Summary
Ship(java.lang.String name, int length, int width, double draft, int capacity, int numberOfHoles)
          The constructor instanciate the agent
 
Method Summary
 TimePoint getArrivalTime()
          The method returns the dynamic variable arrivalTime
 int getCapacity()
          The method returns the capacity of the ship
 TimePoint getDelegatedArrivalTime()
          The method returns the dynamic variable delegatedArrivalTime
 TimePoint getDepartureTime()
          The method returns the dynamic variable departureTime
 double getDraft()
          The method returns the draft of the ship
 int getLength()
          The method returns the length of the ship
 java.lang.String getName()
          The method returns the name of the agent
 int getNumberOfHoles()
          The method returns the ship's amount of holes
 java.lang.String getProduct()
          The method returns the ship's product
 int getWidth()
          The method returns the width of the ship
 boolean isKnockedOut(java.lang.String berthName)
          The method checks if the Ship has been knocked out from a Berth once before.
 void knockOut(java.lang.String berthName)
          The method registrate that the ship has been knocked out from a berth
 void newShip()
          The method reset all dynamic variables to default
 void setArrivalTime(TimePoint arrivalTime)
          The method sets the dynamic variable arrivalTime
 void setDelegatedArrivalTime(TimePoint delegatedArrivalTime)
          The method sets the dynamic variable delegatedArrivalTime
 void setDepartureTime(TimePoint departureTime)
          The method sets the dynamic variable departureTime
 void setProduct(java.lang.String product)
          The method sets the dynamic variable product
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ship

public Ship(java.lang.String name,
            int length,
            int width,
            double draft,
            int capacity,
            int numberOfHoles)
The constructor instanciate the agent

Method Detail

getName

public java.lang.String getName()
The method returns the name of the agent

Returns:
String agentName

getLength

public int getLength()
The method returns the length of the ship

Returns:
int length

getWidth

public int getWidth()
The method returns the width of the ship

Returns:
int width

getDraft

public double getDraft()
The method returns the draft of the ship

Returns:
double draft

getCapacity

public int getCapacity()
The method returns the capacity of the ship

Returns:
int capacity

getNumberOfHoles

public int getNumberOfHoles()
The method returns the ship's amount of holes

Returns:
int numberOfHoles

getProduct

public java.lang.String getProduct()
The method returns the ship's product

Returns:
String product

setProduct

public void setProduct(java.lang.String product)
The method sets the dynamic variable product


setArrivalTime

public void setArrivalTime(TimePoint arrivalTime)
The method sets the dynamic variable arrivalTime


getArrivalTime

public TimePoint getArrivalTime()
The method returns the dynamic variable arrivalTime

Returns:
TimePoint arrivalTime

setDelegatedArrivalTime

public void setDelegatedArrivalTime(TimePoint delegatedArrivalTime)
The method sets the dynamic variable delegatedArrivalTime


getDelegatedArrivalTime

public TimePoint getDelegatedArrivalTime()
The method returns the dynamic variable delegatedArrivalTime

Returns:
TimePoint delegatedArrivalTime

setDepartureTime

public void setDepartureTime(TimePoint departureTime)
The method sets the dynamic variable departureTime


getDepartureTime

public TimePoint getDepartureTime()
The method returns the dynamic variable departureTime

Returns:
TimePoint departureTime

isKnockedOut

public boolean isKnockedOut(java.lang.String berthName)
The method checks if the Ship has been knocked out from a Berth once before.


newShip

public void newShip()
The method reset all dynamic variables to default


knockOut

public void knockOut(java.lang.String berthName)
The method registrate that the ship has been knocked out from a berth