Execution.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:2k
源码类别:
Java编程
开发平台:
Java
- package bible.rmi.example3;
- /**
- * Represents an order execution.
- * @note It implements java.io.Serializable to enable marshalling of it as
- * it will be used as a remote parameter.
- */
- public class Execution implements java.io.Serializable {
- /** number */
- private int number;
- /** symbol */
- private String symbol;
- /** shares */
- private int shares;
- /** price */
- private float price;
- /**
- * getNumber
- */
- public int getNumber() {
- return number;
- }
- /**
- * setNumber
- * @param num
- */
- public void setNumber(int num) {
- number = num;
- }
- /**
- * getSymbol
- */
- public String getSymbol() {
- return symbol;
- }
- /**
- * setSymbol
- * @param sym
- */
- public void setSymbol(String sym) {
- symbol = sym;
- }
- /**
- * getShares
- */
- public int getShares() {
- return shares;
- }
- /**
- * setShares
- * @param s
- */
- public void setShares(int s) {
- shares = s;
- }
- /**
- * getPrice
- */
- public float getPrice() {
- return price;
- }
- /**
- * setPrice
- * @param p
- */
- public void setPrice(float p) {
- price = p;
- }
- /**
- * toString
- */
- public String toString() {
- StringBuffer buf = new StringBuffer();
- buf.append("Executionn");
- buf.append("n Order Number: " + getNumber());
- buf.append("n Symbol: " + getSymbol());
- buf.append("n Shares: " + getShares());
- buf.append("n Price: " + getPrice());
- return buf.toString();
- }
- }