request.java

来自「一个java rmi实现的分布式银行管理系统」· Java 代码 · 共 67 行

JAVA
67
字号
package BS.server.datastructure;

/**
 * @author 束罡
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */

/**
 * 类:ClientRequest
 * 功能:类ClientRequest中的属性对应了客户向服务器的请求消息。
 * */
public class Request {
	private int timestamp = 0;				//时间戳
	private int accountNumber =-1;			//帐户号
	private char transactionType = '#';		//交易类型
	private float amount = -1;				//交易额
	
	/**
	 * 方法:SET**
	 * 功能:负责设置对象的私有属性
	 * 调用参数:相应的参数
	 * 返回值:void
	 * */
	public void SETtimestamp (int str)
	{
		timestamp = str;
	}
	public void SETaccountNumber (int str)
	{
		accountNumber = str;
	}
	public void SETtransactionType (char str)
	{
		transactionType = str;
	}
	public void SETamount (float str)
	{
		amount = str;
	}
	
	/**
	 * 方法:GET**
	 * 功能:负责获取对象的私有属性
	 * 调用参数:无
	 * 返回值:返回相应参数
	 * */
	public int GETtimestamp ()
	{
		return timestamp;
	}
	public int GETaccountNumber ()
	{
		return accountNumber;
	}
	public char GETtransactionType ()
	{
		return transactionType;
	}
	public float GETamount ()
	{
		return amount;
	}

}

⌨️ 快捷键说明

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