1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.qedeq.kernel.se.dto.module;
17
18 import org.qedeq.base.utility.EqualsUtility;
19 import org.qedeq.kernel.se.base.module.Author;
20 import org.qedeq.kernel.se.base.module.Latex;
21
22
23
24
25
26
27
28 public class AuthorVo implements Author {
29
30
31 private Latex name;
32
33
34 private String email;
35
36
37
38
39
40
41
42 public AuthorVo(final LatexVo name, final String email) {
43 this.name = name;
44 this.email = email;
45 }
46
47
48
49
50 public AuthorVo() {
51
52 }
53
54
55
56
57
58
59 public final void setName(final LatexVo name) {
60 this.name = name;
61 }
62
63 public final Latex getName() {
64 return name;
65 }
66
67
68
69
70
71
72 public final void setEmail(final String email) {
73 this.email = email;
74 }
75
76 public final String getEmail() {
77 return email;
78 }
79
80 public boolean equals(final Object obj) {
81 if (!(obj instanceof AuthorVo)) {
82 return false;
83 }
84 final AuthorVo other = (AuthorVo) obj;
85 return EqualsUtility.equals(getName(), other.getName())
86 && EqualsUtility.equals(getEmail(), other.getEmail());
87 }
88
89 public int hashCode() {
90 return (getName() != null ? getName().hashCode() : 0)
91 ^ (getEmail() != null ? 1 ^ getEmail().hashCode() : 0);
92 }
93
94 public String toString() {
95 return getName() + (getEmail() != null ? "<" + getEmail() + ">" : "");
96 }
97
98 }