1   /*
2    * Copyright 2004 The Apache Software Foundation.
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    * 
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   
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: 155402 $
23   */
24  public class ComposerBean {
25  
26      private String forename;
27      private String surname;
28      private int born;
29      
30      public ComposerBean() {}
31      
32      public ComposerBean(String forename, String surname, int born) {
33          setForename(forename);
34          setSurname(surname);
35          setBorn(born);
36      }
37      
38      public int getBorn() {
39          return born;
40      }
41  
42      public String getForename() {
43          return forename;
44      }
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  
60      public void setSurname(String string) {
61          surname = string;
62      }
63  
64      public int hashCode() {
65          return born;
66      }
67      
68      public boolean equals(Object obj) {
69          boolean result = false;
70          if (obj instanceof ComposerBean) {
71              ComposerBean composer = (ComposerBean) obj;
72              result = 
73                  born == composer.born &&
74                  surname.equals(composer.surname) &&
75                  forename.equals(composer.forename);   
76          }
77          return result;
78      }
79      
80  
81  }