View Javadoc

1   /*
2    * @(#) Order.java Dec 4, 2003
3    * 
4    * Copyright (c) 2003-2004 Delft University of Technology Jaffalaan 5, 2628 BX
5    * Delft, the Netherlands All rights reserved.
6    * 
7    * This software is proprietary information of Delft University of Technology
8    * The code is published under the General Public License
9    */
10  package nl.tudelft.simulation.dsol.tutorial.section25;
11  
12  /***
13   * The Order class as presented in section 2.5 in the DSOL tutorial.
14   * <p>
15   * (c) copyright 2003-2004 <a href="http://www.simulation.tudelft.nl"> Delft
16   * University of Technology </a>, the Netherlands. <br>
17   * See for project information <a href="http://www.simulation.tudelft.nl">
18   * www.simulation.tudelft.nl </a> <br>
19   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
20   * License (GPL) </a>, no warranty <br>
21   * 
22   * @version 1.1 Sep 6, 2004 <br>
23   * @author <a href="http://www.tbm.tudelft.nl/webstaf/peterja">Peter Jacobs </a>
24   */
25  public class Order
26  {
27  	/*** the product of an order */
28  	private String product = null;
29  
30  	/*** the amount of product to order */
31  	private double amount = Double.NaN;
32  
33  	/***
34  	 * constructs a new Order
35  	 * 
36  	 * @param product the product
37  	 * @param amount the amount to buy
38  	 */
39  	public Order(final String product, final double amount)
40  	{
41  		super();
42  		this.product = product;
43  		this.amount = amount;
44  	}
45  
46  	/***
47  	 * @see java.lang.Object#toString()
48  	 */
49  	public String toString()
50  	{
51  		return "Order[" + this.product + ";" + this.amount + "]";
52  	}
53  }