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.
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 |
offer
protected Offer offer
strikePrice
protected long strikePrice
lastOffer
protected long lastOffer
prevOffer
protected Offer prevOffer
iteration
protected int iteration
BasicNegotiation
BasicNegotiation(java.lang.String item,
long strikePrice)
- Creates a
BasicNegotiation
object
used to add items to inventory or wishList.
- Parameters:
item
- the String objectstrikePrice
- 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 negotiationstrikePrice
- the long value that is the strike price in the
negotiation
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