messagerejectbid.java

来自「一个非常著名的网格模拟器,能够运行网格调度算法!」· Java 代码 · 共 78 行

JAVA
78
字号
/*
 * Title:        GridSim Toolkit
 * Description:  GridSim (Grid Simulation) Toolkit for Modeling and Simulation
 *               of Parallel and Distributed Systems such as Clusters and Grids
 * Licence:      GPL - http://www.gnu.org/copyleft/gpl.html
 *
 * $Id: MessageRejectBid.java,v 1.2 2006/03/20 04:15:01 anthony Exp $
 */
package gridsim.auction;

/**
 * This class represents a reject of a bid
 * sent by the auctioneer to a bidder
 * 
 * @author       Marcos Dias de Assuncao
 * @since        GridSim Toolkit 4.0
 * 
 * @see gridsim.auction.AuctionTags
 */
public class MessageRejectBid extends Message{
	private int cfpID;
	private int bidID;
	private int round;
	
	/**
	 * Constructor
	 * @param cfpID the call for proposal to which the bid refers
	 * @param bidID the bid ID
	 * @param auctionID the auction this message belongs to
	 * @param protocol the auction protocol in use
	 * @param round the round this message refers to
	 */
	public MessageRejectBid(int cfpID, int bidID, 
			int auctionID, int protocol, int round){
		super(auctionID, protocol);
		this.bidID = bidID;
		this.cfpID = cfpID;
		this.round = round;
	}
	
	/**
	 * Returns the bid's ID
	 * @return the bids ID
	 */
	public int getBidID(){
		return bidID;
	}
	
	/**
	 * Returns the CFP's ID
	 * @return the CFP's ID
	 */
	public int getCfpID(){
		return cfpID;
	}
	
	/**
	 * Returns the round
	 * @return the round
	 */
	public int getRound(){
		return round;
	}
	
	/**
	 * Converts message to String
	 * @return the string representation of the message 
	 */
	public String toString(){
		return super.toString() +  
			"\tBid ID: 		" + bidID + "\n" + 
			"\tCFP ID: 		" + cfpID + "\n" +
			"\tRound: 		" + round + "\n" +			
			"\tType: 		  REJECT BID\n";
	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?