KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > performance > sampledata > OrganicObjectGraphNode_68


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tctest.performance.sampledata;
5
6 public final class OrganicObjectGraphNode_68 extends OrganicObjectGraph {
7
8   private int size = 4;
9   private int[] types = new int[] { 2, 3, 0, 3 };
10
11   private short f0;
12   private double f1;
13   private int f2;
14   private double f3;
15
16   public OrganicObjectGraphNode_68(int sequenceNumber, String JavaDoc envKey) {
17     super(sequenceNumber, envKey);
18   }
19
20   public OrganicObjectGraphNode_68() {
21     super();
22   }
23
24   protected int getSize() {
25     return size;
26   }
27
28   protected int getType(int index) {
29     return types[index];
30   }
31
32   protected void setValue(int index, short value) {
33     switch (index) {
34       case 0:
35         f0 = value;
36       default:
37         break;
38     }
39   }
40
41   protected void setValue(int index, double value) {
42     switch (index) {
43       case 1:
44         f1 = value;
45       case 3:
46         f3 = value;
47       default:
48         break;
49     }
50   }
51
52   protected void setValue(int index, int value) {
53     switch (index) {
54       case 2:
55         f2 = value;
56       default:
57         break;
58     }
59   }
60
61   public boolean equals(Object JavaDoc rawObj) {
62     if (!(rawObj instanceof OrganicObjectGraphNode_68)) { System.out.println("not instanceof"); System.out.println(rawObj.getClass().getName() + "=OrganicObjectGraphNode_68"); return false; }
63     OrganicObjectGraphNode_68 obj = (OrganicObjectGraphNode_68) rawObj;
64     if (f0 != obj.f0) return false;
65     if (f1 != obj.f1) return false;
66     if (f2 != obj.f2) return false;
67     if (f3 != obj.f3) return false;
68     return super.equals(obj);
69   }
70 }
71
Popular Tags