GridSim 5.0 beta

gridsim.auction
Class MessageAsk

Object
  extended by Message
      extended by MessageAsk

public class MessageAsk
extends Message

This class represents an ask sent by a seller to the auctioneer

Since:
GridSim Toolkit 4.0
Author:
Marcos Dias de Assuncao
See Also:
AuctionTags

Field Summary
 
Fields inherited from class Message
TO_ALL_BIDDERS
 
Constructor Summary
MessageAsk(int auctionID, int protocol, float price)
          Constructor
 
Method Summary
 double getPrice()
          Returns the price of this ask
 boolean setPrice(double price)
          Sets the price of this ask
 String toString()
          Converts message to String
 
Methods inherited from class Message
getAttribute, getAttributes, getAuctionID, getDestinationID, getMessageID, getProtocol, getScheduleTime, getSourceID, scheduleToBeSent, setAttribute, setAttributes, setAuctionID, setDestinationID, setMessageID, setProtocol, setSourceID
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageAsk

public MessageAsk(int auctionID,
                  int protocol,
                  float price)
Constructor

Parameters:
auctionID - the auction to which this ask belongs
protocol - the auction protocol used
price - the price of this ask
Method Detail

setPrice

public boolean setPrice(double price)
Sets the price of this ask

Parameters:
price - the price of the ask
Returns:
true if the price was properly set
Pre Condition:
price >= 0.0

getPrice

public double getPrice()
Returns the price of this ask

Returns:
the price

toString

public String toString()
Converts message to String

Overrides:
toString in class Message
Returns:
the string representation of the message

GridSim 5.0 beta

The University of Melbourne, Australia, 2009