1 /**
2 * AUTOHIT 2003
3 * Copyright Erich P Gatejen (c) 1989,1997,2003,2004
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or (at
8 * your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Additional license information can be found in the documentation.
19 * @author Erich P Gatejen
20 */
21 package autohit.common.channels;
22
23 import java.io.Serializable;
24
25 /**
26 * An receipt
27 * @author Erich P. Gatejen
28 * @version 1.0
29 * <i>Version History</i>
30 * <code>EPG - Initial - 25Apr03
31 * EPG - Added setAsInteger and toString to enable future expansion - 2Jul03</code>
32 *
33 */
34 public class Receipt implements Serializable {
35
36 final static long serialVersionUID = 1;
37
38 /**
39 * Generic receipt
40 */
41 protected String info;
42
43 /**
44 * return the type;
45 * @return a string representing the type, in this case it is "generic".
46 */
47 public String getType() {
48 return "generic";
49 }
50
51 /**
52 * default receipt
53 * @param val a value to set as the receipt.
54 */
55 public void setAsInteger(int val) {
56 info = Integer.toString(val);
57 }
58
59 /**
60 * This is a bit clunky, but I expect real receipt
61 * implementations will overload it.
62 * @return a string representation of the receipt.
63 */
64 public String toString() {
65 return info;
66 }
67
68 }
|