KickJava   Java API By Example, From Geeks To Geeks.

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


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