jettyplanner
Class BerthAlternative

java.lang.Object
  extended byjettyplanner.BerthAlternative
All Implemented Interfaces:
java.io.Serializable

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

Class that represent an alternative allocation of a Ship to a Berth This class contains get methods for the variables

See Also:
Serialized Form

Constructor Summary
BerthAlternative(java.lang.String berthName, int berthId, Bid bid)
          Constructor that set the name of the Berth and Bid from the Berth
 
Method Summary
 int getBerthId()
          Get method for the Berths identification number
 java.lang.String getBerthName()
          Get method for the Berths name
 Bid getBid()
          Get method for the Bid in this alternative The cost is calculated when a berth checks for allucation on a ship, and come up with a bid.
 int getCost()
          Get method for the calculatedCost The cost is calculated when a berth checks for allucation on a ship, and come up with a bid.
 java.lang.String getShip()
          Get method for the ship
 java.lang.String toString()
          Method that makes a string representation of this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BerthAlternative

public BerthAlternative(java.lang.String berthName,
                        int berthId,
                        Bid bid)
Constructor that set the name of the Berth and Bid from the Berth

Parameters:
berthName - name of the berth contained in this alternative
bid - the bid for the berth on a ship
See Also:
Bid
Method Detail

getBerthName

public java.lang.String getBerthName()
Get method for the Berths name

Returns:
berth name
See Also:
String

getBerthId

public int getBerthId()
Get method for the Berths identification number

Returns:
id number for the berth

getShip

public java.lang.String getShip()
Get method for the ship

Returns:
a ahip object
See Also:
Ship

getCost

public int getCost()
Get method for the calculatedCost The cost is calculated when a berth checks for allucation on a ship, and come up with a bid.

Returns:
calculated cost value

getBid

public Bid getBid()
Get method for the Bid in this alternative The cost is calculated when a berth checks for allucation on a ship, and come up with a bid.

Returns:
this class bid object
See Also:
Bid

toString

public java.lang.String toString()
Method that makes a string representation of this object

Returns:
a String representation for this object
See Also:
String