3 /**************************************************************************
5 * Java Grande Forum Benchmark Suite - Thread Version 1.0 *
9 * Java Grande Benchmarking Project *
13 * Edinburgh Parallel Computing Centre *
15 * email: epcc-javagrande@epcc.ed.ac.uk *
17 * Original version of this code by Hon Yau (hwyau@epcc.ed.ac.uk) *
19 * This version copyright (c) The University of Edinburgh, 2001. *
20 * All rights reserved. *
22 **************************************************************************/
25 * Base class for all the security objects, namely in terms of
26 * providing a consistent means of identifying each such object.
27 * Also provides some methods for writing out debug messages.
30 * @version $Revision: 1.1 $ $Date: 2008/08/18 22:22:21 $
34 //------------------------------------------------------------------------
35 // Instance variables.
36 //------------------------------------------------------------------------
43 * The start date for the path, in YYYYMMDD format.
45 private int startDate;
47 * The end date for the path, in YYYYMMDD format.
51 * The change in time between two successive data values.
55 //------------------------------------------------------------------------
57 //------------------------------------------------------------------------
59 * Default constructor.
64 this.dTime=(float)0.0;
68 * Another constructor.
70 * @param name The name for the security to record.
72 public PathId(String name) {
76 this.dTime=(float)0.0;
79 //------------------------------------------------------------------------
81 //------------------------------------------------------------------------
82 //------------------------------------------------------------------------
83 // Accessor methods for class PathId.
84 // Generated by 'makeJavaAccessor.pl' script. HWY. 20th January 1999.
85 //------------------------------------------------------------------------
87 * Accessor method for private instance variable <code>name</code>.
89 * @return Value of instance variable <code>name</code>.
90 * @exception DemoException thrown if instance variable <code>name</code> is undefined.
92 public String get_name() {
96 * Set method for private instance variable <code>name</code>.
98 * @param name the value to set for the instance variable <code>name</code>.
100 public void set_name(String name) {
104 * Accessor method for private instance variable <code>startDate</code>.
106 * @return Value of instance variable <code>startDate</code>.
107 * @exception DemoException thrown if instance variable <code>startDate</code> is undefined.
109 public int get_startDate() {
110 return(this.startDate);
113 * Set method for private instance variable <code>startDate</code>.
115 * @param startDate the value to set for the instance variable <code>startDate</code>.
117 public void set_startDate(int startDate) {
118 this.startDate = startDate;
121 * Accessor method for private instance variable <code>endDate</code>.
123 * @return Value of instance variable <code>endDate</code>.
124 * @exception DemoException thrown if instance variable <code>endDate</code> is undefined.
126 public int get_endDate() {
127 return(this.endDate);
130 * Set method for private instance variable <code>endDate</code>.
132 * @param endDate the value to set for the instance variable <code>endDate</code>.
134 public void set_endDate(int endDate) {
135 this.endDate = endDate;
138 * Accessor method for private instance variable <code>dTime</code>.
140 * @return Value of instance variable <code>dTime</code>.
141 * @exception DemoException thrown if instance variable <code>dTime</code> is undefined.
143 public float get_dTime() {
147 * Set method for private instance variable <code>dTime</code>.
149 * @param dTime the value to set for the instance variable <code>dTime</code>.
151 public void set_dTime(float dTime) {
154 //------------------------------------------------------------------------
156 * Clone the instance variables in this class, from another instance
159 * @param obj the PathId object from which to copy.
160 * @exception DemoException thrown if the values to be copied contain
161 * any undefined objects.
163 public void copyInstanceVariables(PathId obj) {
164 this.name = obj.get_name();
165 this.startDate = obj.get_startDate();
166 this.endDate = obj.get_endDate();
167 this.dTime = obj.get_dTime();
170 * Dumps the contents of the fields, to standard-out, for debugging.
172 public void dbgDumpFields() {
173 // dbgPrintln("name=" +this.name);
174 // dbgPrintln("startDate="+this.startDate);
175 // dbgPrintln("endDate=" +this.endDate);
176 // dbgPrintln("dTime=" +this.dTime);