01: package org.drools;
02:
03: public class Sensor {
04: private int temperature;
05: private int pressure;
06:
07: public Sensor() {
08:
09: }
10:
11: public Sensor(final int temp, final int press) {
12: this .temperature = temp;
13: this .pressure = press;
14: }
15:
16: /**
17: * @return the pressure
18: */
19: public int getPressure() {
20: return this .pressure;
21: }
22:
23: /**
24: * @param pressure the pressure to set
25: */
26: public void setPressure(final int pressure) {
27: this .pressure = pressure;
28: }
29:
30: /**
31: * @return the temperature
32: */
33: public int getTemperature() {
34: return this .temperature;
35: }
36:
37: /**
38: * @param temperature the temperature to set
39: */
40: public void setTemperature(final int temperature) {
41: this .temperature = temperature;
42: }
43:
44: public String toString() {
45: return "Sensor [ temperature = " + this .temperature
46: + ", pressure = " + this .pressure + " ]";
47: }
48:
49: }
|