1
2
3
4
5
6
7
8
9
10 package org.mule.jaxb.model;
11
12 import javax.xml.bind.annotation.XmlAccessType;
13 import javax.xml.bind.annotation.XmlAccessorType;
14 import javax.xml.bind.annotation.XmlRootElement;
15
16
17
18
19 @XmlRootElement(name = "emailAddress")
20 @XmlAccessorType(XmlAccessType.FIELD)
21 public class EmailAddress
22 {
23 private String type;
24 private String address;
25
26 public EmailAddress()
27 {
28 super();
29 }
30
31 public EmailAddress(String address, String type)
32 {
33 super();
34 this.address = address;
35 this.type = type;
36 }
37
38 public String getType()
39 {
40 return type;
41 }
42
43 public void setType(String type)
44 {
45 this.type = type;
46 }
47
48 public String getAddress()
49 {
50 return address;
51 }
52
53 public void setAddress(String address)
54 {
55 this.address = address;
56 }
57
58 @Override
59 public boolean equals(Object o)
60 {
61 if (this == o)
62 {
63 return true;
64 }
65 if (o == null || getClass() != o.getClass())
66 {
67 return false;
68 }
69
70 EmailAddress that = (EmailAddress) o;
71
72 if (address != null ? !address.equals(that.address) : that.address != null)
73 {
74 return false;
75 }
76 if (type != null ? !type.equals(that.type) : that.type != null)
77 {
78 return false;
79 }
80
81 return true;
82 }
83
84 @Override
85 public int hashCode()
86 {
87 int result = type != null ? type.hashCode() : 0;
88 result = 31 * result + (address != null ? address.hashCode() : 0);
89 return result;
90 }
91 }