01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package org.apache.commons.betwixt.strategy;
19:
20: /**
21: * @author <a href='http://jakarta.apache.org/'>Jakarta Commons Team</a>
22: * @version $Revision: 438373 $
23: */
24: public class ComposerBean {
25:
26: private String forename;
27: private String surname;
28: private int born;
29:
30: public ComposerBean() {
31: }
32:
33: public ComposerBean(String forename, String surname, int born) {
34: setForename(forename);
35: setSurname(surname);
36: setBorn(born);
37: }
38:
39: public int getBorn() {
40: return born;
41: }
42:
43: public String getForename() {
44: return forename;
45: }
46:
47: public String getSurname() {
48: return surname;
49: }
50:
51: public void setBorn(int i) {
52: born = i;
53: }
54:
55: public void setForename(String string) {
56: forename = string;
57: }
58:
59: public void setSurname(String string) {
60: surname = string;
61: }
62:
63: public int hashCode() {
64: return born;
65: }
66:
67: public boolean equals(Object obj) {
68: boolean result = false;
69: if (obj instanceof ComposerBean) {
70: ComposerBean composer = (ComposerBean) obj;
71: result = born == composer.born
72: && surname.equals(composer.surname)
73: && forename.equals(composer.forename);
74: }
75: return result;
76: }
77:
78: }
|