01: /*
02: * Copyright 2005 JBoss Inc
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.drools.examples.manners;
17:
18: public class Count {
19: private int value;
20:
21: public Count() {
22: }
23:
24: public Count(final int value) {
25: super ();
26: this .value = value;
27: }
28:
29: public int getValue() {
30: return this .value;
31: }
32:
33: public void setValue(final int value) {
34: this .value = value;
35: }
36:
37: public String toString() {
38: return "[Count value=" + this .value + "]";
39: }
40:
41: public boolean equals(final Object object) {
42: if (object == this ) {
43: return true;
44: }
45:
46: if ((object == null) || !(object instanceof Count)) {
47: return false;
48: }
49:
50: return this .value == ((Count) object).value;
51: }
52:
53: public int hashCode() {
54: return this.value;
55: }
56:
57: }
|