KickJava   Java API By Example, From Geeks To Geeks.

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


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