KickJava   Java API By Example, From Geeks To Geeks.

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


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