KickJava   Java API By Example, From Geeks To Geeks.

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


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