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.ChangedRule;
20 import org.qedeq.kernel.se.base.module.LatexList;
21
22
23
24
25
26
27
28 public class ChangedRuleVo implements ChangedRule {
29
30
31 private LatexList description;
32
33
34 private String name;
35
36
37 private String version;
38
39
40
41
42 public ChangedRuleVo() {
43
44 }
45
46
47
48
49
50
51
52 public final void setName(final String name) {
53 this.name = name;
54 }
55
56 public final String getName() {
57 return name;
58 }
59
60
61
62
63
64
65 public final void setVersion(final String version) {
66 this.version = version;
67 }
68
69 public final String getVersion() {
70 return version;
71 }
72
73
74
75
76
77
78 public final void setDescription(final LatexListVo description) {
79 this.description = description;
80 }
81
82 public LatexList getDescription() {
83 return description;
84 }
85
86 public boolean equals(final Object obj) {
87 if (!(obj instanceof ChangedRule)) {
88 return false;
89 }
90 final ChangedRule other = (ChangedRule) obj;
91 return EqualsUtility.equals(getName(), other.getName())
92 && EqualsUtility.equals(getVersion(), other.getVersion())
93 && EqualsUtility.equals(getDescription(), other.getDescription());
94 }
95
96 public int hashCode() {
97 return (getName() != null ? 1 ^ getName().hashCode() : 0)
98 ^ (getVersion() != null ? 2 ^ getVersion().hashCode() : 0)
99 ^ (getDescription() != null ? 4 ^ getDescription().hashCode() : 0);
100 }
101
102 public String toString() {
103 final StringBuffer buffer = new StringBuffer();
104 buffer.append("Rule change: " + getName() + " [" + getVersion() + "]\n");
105 buffer.append("\nDescription:\n");
106 buffer.append(getDescription());
107 return buffer.toString();
108 }
109 }