KickJava   Java API By Example, From Geeks To Geeks.

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


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