1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.ws.scout.registry.infomodel;
18
19 import javax.xml.registry.infomodel.Key;
20
21
22
23
24
25
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 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 }