KickJava   Java API By Example, From Geeks To Geeks.

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


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