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