01: /*
02: This file is part of the PolePosition database benchmark
03: http://www.polepos.org
04:
05: This program is free software; you can redistribute it and/or
06: modify it under the terms of the GNU General Public License
07: as published by the Free Software Foundation; either version 2
08: of the License, or (at your option) any later version.
09:
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.circuits.barcelona;
21:
22: import org.polepos.framework.*;
23:
24: public class B4 extends B3 implements CheckSummable {
25:
26: public B4() {
27: }
28:
29: public B4(int i0, int i1, int i2, int i3, int i4) {
30: super (i0, i1, i2, i3);
31: b4 = i4;
32: }
33:
34: private int b4;
35:
36: public void setB4(int i) {
37: b4 = i;
38: }
39:
40: public int getB4() {
41: return b4;
42: }
43:
44: public long checkSum() {
45: return b4;
46: }
47:
48: public void setAll(int i) {
49: setB0(i);
50: setB1(i);
51: setB2(i);
52: setB3(i);
53: setB4(i);
54: }
55:
56: public int getBx(int x) {
57: if (x == 0) {
58: return getB0();
59: }
60: if (x == 1) {
61: return getB1();
62: }
63: if (x == 2) {
64: return getB2();
65: }
66: if (x == 3) {
67: return getB3();
68: }
69: if (x == 4) {
70: return getB4();
71: }
72: throw new IllegalArgumentException();
73: }
74:
75: }
|