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.FormalProof;
20 import org.qedeq.kernel.se.base.module.FormalProofLineList;
21 import org.qedeq.kernel.se.base.module.LatexList;
22
23
24
25
26
27
28
29 public class FormalProofVo implements FormalProof {
30
31
32 private LatexList precedingText;
33
34
35 private FormalProofLineList formalProofLineList;
36
37
38 private LatexList succeedingText;
39
40
41
42
43 public FormalProofVo() {
44
45 }
46
47
48
49
50
51
52 public FormalProofVo(final FormalProofLineList formalProofLines) {
53 this.formalProofLineList = formalProofLines;
54 }
55
56
57
58
59
60
61 public final void setPrecedingText(final LatexListVo precedingText) {
62 this.precedingText = precedingText;
63 }
64
65 public final LatexList getPrecedingText() {
66 return precedingText;
67 }
68
69
70
71
72
73
74 public final void setFormalProofLineList(final FormalProofLineList formalProofLines) {
75 this.formalProofLineList = formalProofLines;
76 }
77
78 public final FormalProofLineList getFormalProofLineList() {
79 return formalProofLineList;
80 }
81
82
83
84
85
86
87 public final void setSucceedingText(final LatexListVo succeedingText) {
88 this.succeedingText = succeedingText;
89 }
90
91 public final LatexList getSucceedingText() {
92 return succeedingText;
93 }
94
95 public boolean equals(final Object obj) {
96 if (!(obj instanceof FormalProofVo)) {
97 return false;
98 }
99 final FormalProofVo other = (FormalProofVo) obj;
100 return EqualsUtility.equals(getPrecedingText(), other.getPrecedingText())
101 && EqualsUtility.equals(getFormalProofLineList(), other.getFormalProofLineList())
102 && EqualsUtility.equals(getSucceedingText(), other.getSucceedingText());
103 }
104
105 public int hashCode() {
106 return (getPrecedingText() != null ? getPrecedingText().hashCode() : 0)
107 ^ (getFormalProofLineList() != null ? 2 ^ getFormalProofLineList().hashCode() : 0)
108 ^ (getSucceedingText() != null ? 3 ^ getSucceedingText().hashCode() : 0);
109 }
110
111 public String toString() {
112 final StringBuffer result = new StringBuffer();
113 if (getPrecedingText() != null) {
114 result.append(getPrecedingText());
115 }
116 if (getFormalProofLineList() != null) {
117 result.append("Formal Proof: " + getFormalProofLineList());
118 }
119 if (getSucceedingText() != null) {
120 result.append(getSucceedingText());
121 }
122 return result.toString();
123 }
124
125
126 }