Execution.java
资源名称:某公司的java培训教材 [点击查看]
上传用户:dinglihq
上传日期:2013-02-04
资源大小:99958k
文件大小:2k
源码类别:
Java编程
开发平台:
Java
- package bible.rmi.example4;
- /**
- * Represents an execution.
- * Notice that it implements SERIALIZABLE.
- */
- public class Execution implements java.io.Serializable {
- /** number */
- private int number;
- /** symbol */
- private String symbol;
- /** shares */
- private int shares;
- /** price */
- private float price;
- /**
- * Method getNumber
- *
- *
- * @return
- *
- */
- public int getNumber() {
- return number;
- }
- /**
- * Method setNumber
- *
- *
- * @param num
- *
- */
- public void setNumber(int num) {
- number = num;
- }
- /**
- * Method getSymbol
- *
- *
- * @return
- *
- */
- public String getSymbol() {
- return symbol;
- }
- /**
- * Method setSymbol
- *
- *
- * @param sym
- *
- */
- public void setSymbol(String sym) {
- symbol = sym;
- }
- /**
- * Method getShares
- *
- *
- * @return
- *
- */
- public int getShares() {
- return shares;
- }
- /**
- * Method setShares
- *
- *
- * @param s
- *
- */
- public void setShares(int s) {
- shares = s;
- }
- /**
- * Method getPrice
- *
- *
- * @return
- *
- */
- public float getPrice() {
- return price;
- }
- /**
- * Method setPrice
- *
- *
- * @param p
- *
- */
- public void setPrice(float p) {
- price = p;
- }
- /**
- * Method toString
- *
- *
- * @return
- *
- */
- 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();
- }
- }