KickJava   Java API By Example, From Geeks To Geeks.

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


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