marketplace
Class BasicNegotiation

java.lang.Object
  |
  +--marketplace.BasicNegotiation

public class BasicNegotiation
extends java.lang.Object

The BasicNegotiation class implements the negotiation object used in the marketplace application.


Field Summary
protected  int iteration
           
protected  long lastOffer
           
protected  Offer offer
           
protected  Offer prevOffer
           
protected  long strikePrice
           
 
Constructor Summary
(package private) BasicNegotiation(Offer offer, long strikePrice)
          Creates a BasicNegotiation object used for a new negotiation.
(package private) BasicNegotiation(java.lang.String item, long strikePrice)
          Creates a BasicNegotiation object used to add items to inventory or wishList.
 
Method Summary
(package private)  java.lang.String getItem()
          Retrieves the item from the offer that is part of this negotiation.
 void newOffer(Offer newOffer)
          Sets the current offer to the new offer.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offer

protected Offer offer

strikePrice

protected long strikePrice

lastOffer

protected long lastOffer

prevOffer

protected Offer prevOffer

iteration

protected int iteration
Constructor Detail

BasicNegotiation

BasicNegotiation(java.lang.String item,
                 long strikePrice)
Creates a BasicNegotiation object used to add items to inventory or wishList.
Parameters:
item - the String object
strikePrice - the long object

BasicNegotiation

BasicNegotiation(Offer offer,
                 long strikePrice)
Creates a BasicNegotiation object used for a new negotiation.
Parameters:
offer - the Offer object that is part of the negotiation
strikePrice - the long value that is the strike price in the negotiation
Method Detail

newOffer

public void newOffer(Offer newOffer)
Sets the current offer to the new offer.
Parameters:
newOffer - the Offer object that contains the new offer

getItem

java.lang.String getItem()
Retrieves the item from the offer that is part of this negotiation.
Returns:
the String object that represents the item