01: package org.drools;
02:
03: public class InsertedObject {
04: private String value;
05:
06: public String getValue() {
07: return this .value;
08: }
09:
10: public void setValue(final String value) {
11: this .value = value;
12: }
13:
14: public InsertedObject(final String value) {
15: this .value = value;
16: }
17:
18: public InsertedObject() {
19: }
20:
21: public int hashCode() {
22: final int PRIME = 31;
23: int result = 1;
24: result = PRIME * result
25: + ((value == null) ? 0 : value.hashCode());
26: return result;
27: }
28:
29: public boolean equals(Object obj) {
30: if (this == obj)
31: return true;
32: if (obj == null)
33: return false;
34: if (getClass() != obj.getClass())
35: return false;
36: final InsertedObject other = (InsertedObject) obj;
37: if (value == null) {
38: if (other.value != null)
39: return false;
40: } else if (!value.equals(other.value))
41: return false;
42: return true;
43: }
44:
45: }
|