KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > xb > binding > metadata > PutMethodMetaData


1 /*
2   * JBoss, Home of Professional Open Source
3   * Copyright 2005, JBoss Inc., and individual contributors as indicated
4   * by the @authors tag. See the copyright.txt in the distribution for a
5   * full listing of individual contributors.
6   *
7   * This is free software; you can redistribute it and/or modify it
8   * under the terms of the GNU Lesser General Public License as
9   * published by the Free Software Foundation; either version 2.1 of
10   * the License, or (at your option) any later version.
11   *
12   * This software is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15   * Lesser General Public License for more details.
16   *
17   * You should have received a copy of the GNU Lesser General Public
18   * License along with this software; if not, write to the Free
19   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21   */

22 package org.jboss.xb.binding.metadata;
23
24 /**
25  * @author <a HREF="mailto:alex@jboss.org">Alexey Loubyansky</a>
26  * @version <tt>$Revision: 1958 $</tt>
27  */

28 public class PutMethodMetaData
29 {
30    private String JavaDoc methodName;
31    private String JavaDoc keyType;
32    private String JavaDoc valueType;
33
34    public String JavaDoc getName()
35    {
36       return methodName;
37    }
38
39    public void setName(String JavaDoc methodName)
40    {
41       this.methodName = methodName;
42    }
43
44    public String JavaDoc getKeyType()
45    {
46       return keyType;
47    }
48
49    public void setKeyType(String JavaDoc keyType)
50    {
51       this.keyType = keyType;
52    }
53
54    public String JavaDoc getValueType()
55    {
56       return valueType;
57    }
58
59    public void setValueType(String JavaDoc valueType)
60    {
61       this.valueType = valueType;
62    }
63
64    public boolean equals(Object JavaDoc o)
65    {
66       if(this == o)
67       {
68          return true;
69       }
70       if(!(o instanceof PutMethodMetaData))
71       {
72          return false;
73       }
74
75       final PutMethodMetaData putMethodMetaData = (PutMethodMetaData)o;
76
77       if(keyType != null ? !keyType.equals(putMethodMetaData.keyType) : putMethodMetaData.keyType != null)
78       {
79          return false;
80       }
81       if(methodName != null ? !methodName.equals(putMethodMetaData.methodName) : putMethodMetaData.methodName != null)
82       {
83          return false;
84       }
85       if(valueType != null ? !valueType.equals(putMethodMetaData.valueType) : putMethodMetaData.valueType != null)
86       {
87          return false;
88       }
89
90       return true;
91    }
92
93    public int hashCode()
94    {
95       int result;
96       result = (methodName != null ? methodName.hashCode() : 0);
97       result = 29 * result + (keyType != null ? keyType.hashCode() : 0);
98       result = 29 * result + (valueType != null ? valueType.hashCode() : 0);
99       return result;
100    }
101 }
102
Popular Tags