marketplace
Class Offer

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

public class Offer
extends java.lang.Object

The Offer class implements the offer used by the buyer and seller agents in the marketplace application.


Field Summary
protected  java.lang.String id
           
protected  java.lang.String item
           
protected  long price
           
protected  java.lang.String sender
           
 
Constructor Summary
(package private) Offer(BuySellMessage msg)
          Creates a Offer object using information in the BuySellMessage.
(package private) Offer(java.lang.String item)
          Creates a Offer object that contains the given item.
(package private) Offer(java.lang.String sender, java.lang.String item, java.lang.String id, long price)
          Creates a Offer object with the given parameters.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sender

protected java.lang.String sender

item

protected java.lang.String item

id

protected java.lang.String id

price

protected long price
Constructor Detail

Offer

Offer(java.lang.String item)
Creates a Offer object that contains the given item.
Parameters:
item - the String object that contains the item for which an offer is being made

Offer

Offer(java.lang.String sender,
      java.lang.String item,
      java.lang.String id,
      long price)
Creates a Offer object with the given parameters.
Parameters:
sender - the String object that contains who is making the offer
item - the String object that contains the item
id - the String object that contains the item identifier
price - the long value for the offer price

Offer

Offer(BuySellMessage msg)
Creates a Offer object using information in the BuySellMessage.
Parameters:
msg - the BuySellMessage object that contains information about the offer being made