⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orderitem.java

📁 BEA WebLogic Server 8.1大全 = BEA webLogic server 8.1 unleashed (美) Mark Artiges等著 袁毅 ... [等] 译 eng
💻 JAVA
字号:
package  com.wls8unleashed.jms;

import java.io.Serializable;

/**
 * Implements a simple serializable order item
 * used with these JMS examples.
 */
public class OrderItem implements Serializable{
  private String itemID;
  private String itemDescription;
  private int quantity;
  private double price;

	/** 
	 * Construct an OrderItem with its data.
	 */
  public OrderItem(  String itemID, String itemDescription,
                         int quantity, double price){
    this.itemID = itemID;
    this.itemDescription = itemDescription;
    this.quantity = quantity;
    this.price = price;
  }              

	/**
	 * Print out the OrderItem info.
	 */
  public String toString(){
    return "OrderItem--> { "
            + "(ID, " + itemID + "), "
            + "(Description, " + itemDescription + "), "
            + "(Quantity, " + quantity + "), "
            + "(Price, $" + price + ") }";    
  }
  
  public String getID(){ return itemID; }

  public String getDescription(){ return itemDescription;}

  public int getQuantity(){ return quantity;}

  public double getPrice(){ return price;}
}

⌨️ 快捷键说明

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