de.upb.swtpra05.group03.shuttle
Class BestShuttleOfferPrice

java.lang.Object
  extended byde.upb.swtpra05.group03.shuttle.BestShuttleOfferPrice

class BestShuttleOfferPrice
extends java.lang.Object

Structure to hold the id of a shuttle and its offerPrice


Field Summary
private  int offerPrice
          the offer price of the shuttle
private  de.upb.swtpra.kernel.id.ID shuttleID
          the id of the shuttleID
private  int updateCounter
          number of compared offerPrice
 
Constructor Summary
BestShuttleOfferPrice(de.upb.swtpra.kernel.id.ID shuttleID, int offerPrice)
          Default Constructor
 
Method Summary
 int getOfferPrice()
          Returns the offerPrice of the shuttle
 de.upb.swtpra.kernel.id.ID getShuttleID()
          Returns the id of the shuttle
 int getUpdateCounter()
           
 void update(de.upb.swtpra.kernel.id.ID shuttleId, int shuttleOfferPrice)
          Update the best shuttle bestOfferPrices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shuttleID

private de.upb.swtpra.kernel.id.ID shuttleID
the id of the shuttleID


offerPrice

private int offerPrice
the offer price of the shuttle


updateCounter

private int updateCounter
number of compared offerPrice

Constructor Detail

BestShuttleOfferPrice

public BestShuttleOfferPrice(de.upb.swtpra.kernel.id.ID shuttleID,
                             int offerPrice)
Default Constructor

Parameters:
shuttleID - the id of the shuttle
offerPrice - the offerPrice of the shuttle
Method Detail

getShuttleID

public de.upb.swtpra.kernel.id.ID getShuttleID()
Returns the id of the shuttle

Returns:
the id of the shuttle

getOfferPrice

public int getOfferPrice()
Returns the offerPrice of the shuttle

Returns:
the id of the shuttle

update

public void update(de.upb.swtpra.kernel.id.ID shuttleId,
                   int shuttleOfferPrice)
Update the best shuttle bestOfferPrices

Parameters:
shuttleId - the id of the shuttle
shuttleOfferPrice - the offerPrice of the shuttle

getUpdateCounter

public int getUpdateCounter()
Returns:
the number of compared bestOfferPrices