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 String getType()
27 {
28 return type;
29 }
30
31 public void setType(String type)
32 {
33 this.type = type;
34 }
35
36 public String getAddress()
37 {
38 return address;
39 }
40
41 public void setAddress(String address)
42 {
43 this.address = address;
44 }
45
46 @Override
47 public boolean equals(Object o)
48 {
49 if (this == o)
50 {
51 return true;
52 }
53 if (o == null || getClass() != o.getClass())
54 {
55 return false;
56 }
57
58 EmailAddress that = (EmailAddress) o;
59
60 if (address != null ? !address.equals(that.address) : that.address != null)
61 {
62 return false;
63 }
64 if (type != null ? !type.equals(that.type) : that.type != null)
65 {
66 return false;
67 }
68
69 return true;
70 }
71
72 @Override
73 public int hashCode()
74 {
75 int result = type != null ? type.hashCode() : 0;
76 result = 31 * result + (address != null ? address.hashCode() : 0);
77 return result;
78 }
79 }