View Javadoc
1   /*
2    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
3    * The software in this package is published under the terms of the CPAL v1.0
4    * license, a copy of which has been included with this distribution in the
5    * LICENSE.txt file.
6    */
7   package org.mule.jaxb.model;
8   
9   import javax.xml.bind.annotation.XmlAccessType;
10  import javax.xml.bind.annotation.XmlAccessorType;
11  import javax.xml.bind.annotation.XmlRootElement;
12  
13  /**
14   * TODO
15   */
16  @XmlRootElement(name = "emailAddress")
17  @XmlAccessorType(XmlAccessType.FIELD)
18  public class EmailAddress
19  {
20      private String type;
21      private String address;
22  
23      public String getType()
24      {
25          return type;
26      }
27  
28      public void setType(String type)
29      {
30          this.type = type;
31      }
32  
33      public String getAddress()
34      {
35          return address;
36      }
37  
38      public void setAddress(String address)
39      {
40          this.address = address;
41      }
42  
43      @Override
44      public boolean equals(Object o)
45      {
46          if (this == o)
47          {
48              return true;
49          }
50          if (o == null || getClass() != o.getClass())
51          {
52              return false;
53          }
54  
55          EmailAddress that = (EmailAddress) o;
56  
57          if (address != null ? !address.equals(that.address) : that.address != null)
58          {
59              return false;
60          }
61          if (type != null ? !type.equals(that.type) : that.type != null)
62          {
63              return false;
64          }
65  
66          return true;
67      }
68  
69      @Override
70      public int hashCode()
71      {
72          int result = type != null ? type.hashCode() : 0;
73          result = 31 * result + (address != null ? address.hashCode() : 0);
74          return result;
75      }
76  }