01: package org.contineo.core.communication;
02:
03: /**
04: * @author Michael Scholz
05: */
06: public class Recipient {
07:
08: private String name = "";
09:
10: private String address = "";
11:
12: public Recipient() {
13: }
14:
15: public String getName() {
16: return name;
17: }
18:
19: public String getAddress() {
20: return address;
21: }
22:
23: public void setName(String nme) {
24: name = nme;
25: }
26:
27: public void setAddress(String addr) {
28: address = addr;
29: }
30:
31: @Override
32: public boolean equals(Object arg0) {
33: if (!(arg0 instanceof Recipient))
34: return false;
35: Recipient other = (Recipient) arg0;
36: return other.getAddress().equals(address);
37: }
38:
39: @Override
40: public int hashCode() {
41: return address.hashCode();
42: }
43:
44: }
|