KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > polepos > data > Pilot


1 /*
2 This file is part of the PolePosition database benchmark
3 http://www.polepos.org
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public
16 License along with this program; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA. */

19
20 package org.polepos.data;
21
22 import org.polepos.framework.*;
23
24 /**
25  *
26  * @author Herkules
27  */

28 public class Pilot implements CheckSummable
29 {
30     private String JavaDoc mName;
31     private String JavaDoc mFirstName;
32     private int mPoints;
33     private int mLicenseID;
34
35     
36     /**
37      * Default.
38      */

39     public Pilot()
40     {
41     }
42     
43     
44     /**
45      * Creates a new instance of Pilot.
46      */

47     public Pilot(String JavaDoc name, int points)
48     {
49         this.mName=name;
50         this.mPoints=points;
51     }
52     
53     /**
54      * Full ctor.
55      */

56     public Pilot( String JavaDoc name, String JavaDoc firstname, int points, int licenseID )
57     {
58         mName = name;
59         mFirstName = firstname;
60         mPoints = points;
61         mLicenseID = licenseID;
62     }
63     
64     
65     public int getPoints()
66     {
67         return mPoints;
68     }
69     
70     public void setPoints( int points )
71     {
72         mPoints = points;
73     }
74
75     public void addPoints(int points)
76     {
77         this.mPoints+=points;
78     }
79     
80     public String JavaDoc getName()
81     {
82         return mName;
83     }
84
85     public void setName( String JavaDoc name )
86     {
87         mName = name;
88     }
89
90     public String JavaDoc getFirstName()
91     {
92         return mFirstName;
93     }
94     
95     public void setFirstName( String JavaDoc firstname )
96     {
97         mFirstName = firstname;
98     }
99     
100     public int getLicenseID()
101     {
102         return mLicenseID;
103     }
104     
105     public void setLicenseID( int id )
106     {
107         mLicenseID = id;
108     }
109
110     public String JavaDoc toString()
111     {
112         return mName+"/"+mPoints;
113     }
114
115
116     public long checkSum() {
117         return getPoints();
118     }
119 }
120
Popular Tags