This project has retired. For details please refer to its Attic page.
KeyImpl xref
View Javadoc
1   /*
2    * Copyright 2001-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  package org.apache.ws.scout.registry.infomodel;
18  
19  import javax.xml.registry.infomodel.Key;
20  
21  /**
22   * Implements JAXR Interface.
23   * For further details, look into the JAXR API Javadoc.
24   *
25   * @author Anil Saldhana  <anil@apache.org>
26   */
27  public class KeyImpl implements Key
28  {
29      private String id;
30  
31      public KeyImpl()
32      {
33      }
34  
35      public KeyImpl(String id)
36      {
37          this.id = id;
38      }
39  
40      public String getId()
41      {
42          return id;
43      }
44  
45      public void setId(String str)
46      {
47          this.id = str;
48      }
49  
50      public boolean equals(Object o)
51      {
52          if (this == o) return true;
53          if (!(o instanceof KeyImpl)) return false;
54          final KeyImpl="../../../../../../org/apache/ws/scout/registry/infomodel/KeyImpl.html#KeyImpl">KeyImpl key = (KeyImpl) o;
55          if (id != null ? !id.equals(key.id) : key.id != null) return false;
56          return true;
57      }
58  
59      public int hashCode()
60      {
61          return (id != null ? id.hashCode() : 0);
62      }
63  
64      public String toString()
65      {
66          return id;
67      }
68  }