01
/**//* Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com */
02
03
package com.db4odoc.taexamples.instrumented;
04
05
public class SensorPanel ...{
06
07
public Object _sensor;
08
09
public SensorPanel _next;
10
11
public SensorPanel() ...{
12
// default constructor for instantiation
13
}
14
15
public SensorPanel(int value) ...{
16
_sensor = new Integer(value);
17
}
18
19
public SensorPanel createList(int length) ...{
20
return createList(length, 1);
21
}
22
23
public SensorPanel createList(int length, int first) ...{
24
int val = first;
25
SensorPanel root = newElement(first);
26
SensorPanel list = root;
27
while (--length > 0) ...{
28
list._next = newElement(++val);
29
list = list._next;
30
}
31
return root;
32
}
33
34
protected SensorPanel newElement(int value) ...{
35
return new SensorPanel(value);
36
}
37
38
public String toString() ...{
39
return "Sensor #" + _sensor;
40
}
41
}