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.Axiom; |
21 |
| import org.qedeq.kernel.base.module.FunctionDefinition; |
22 |
| import org.qedeq.kernel.base.module.LatexList; |
23 |
| import org.qedeq.kernel.base.module.PredicateDefinition; |
24 |
| import org.qedeq.kernel.base.module.Proposition; |
25 |
| import org.qedeq.kernel.base.module.Rule; |
26 |
| import org.qedeq.kernel.base.module.Term; |
27 |
| import org.qedeq.kernel.base.module.VariableList; |
28 |
| import org.qedeq.kernel.utility.EqualsUtility; |
29 |
| |
30 |
| |
31 |
| |
32 |
| |
33 |
| |
34 |
| |
35 |
| |
36 |
| |
37 |
| |
38 |
| public class FunctionDefinitionVo implements FunctionDefinition { |
39 |
| |
40 |
| |
41 |
| private String argumentNumber; |
42 |
| |
43 |
| |
44 |
| private String name; |
45 |
| |
46 |
| |
47 |
| |
48 |
| |
49 |
| private String latexPattern; |
50 |
| |
51 |
| |
52 |
| |
53 |
| private VariableList variableList; |
54 |
| |
55 |
| |
56 |
| private Term term; |
57 |
| |
58 |
| |
59 |
| private LatexList description; |
60 |
| |
61 |
| |
62 |
| |
63 |
| |
64 |
267
| public FunctionDefinitionVo() {
|
65 |
| |
66 |
| } |
67 |
| |
68 |
0
| public Axiom getAxiom() {
|
69 |
0
| return null;
|
70 |
| } |
71 |
| |
72 |
0
| public PredicateDefinition getPredicateDefinition() {
|
73 |
0
| return null;
|
74 |
| } |
75 |
| |
76 |
2020
| public FunctionDefinition getFunctionDefinition() {
|
77 |
2020
| return this;
|
78 |
| } |
79 |
| |
80 |
0
| public Proposition getProposition() {
|
81 |
0
| return null;
|
82 |
| } |
83 |
| |
84 |
0
| public Rule getRule() {
|
85 |
0
| return null;
|
86 |
| } |
87 |
| |
88 |
| |
89 |
| |
90 |
| |
91 |
| |
92 |
| |
93 |
224
| public final void setArgumentNumber(final String argumentNumber) {
|
94 |
224
| this.argumentNumber = argumentNumber;
|
95 |
| } |
96 |
| |
97 |
733
| public final String getArgumentNumber() {
|
98 |
733
| return argumentNumber;
|
99 |
| } |
100 |
| |
101 |
| |
102 |
| |
103 |
| |
104 |
| |
105 |
| |
106 |
| |
107 |
224
| public void setName(final String name) {
|
108 |
224
| this.name = name;
|
109 |
| } |
110 |
| |
111 |
759
| public String getName() {
|
112 |
759
| return name;
|
113 |
| } |
114 |
| |
115 |
| |
116 |
| |
117 |
| |
118 |
| |
119 |
| |
120 |
| |
121 |
| |
122 |
224
| public final void setLatexPattern(final String latexPattern) {
|
123 |
224
| this.latexPattern = latexPattern;
|
124 |
| } |
125 |
| |
126 |
1363
| public final String getLatexPattern() {
|
127 |
1363
| return latexPattern;
|
128 |
| } |
129 |
| |
130 |
| |
131 |
| |
132 |
| |
133 |
| |
134 |
| |
135 |
| |
136 |
185
| public final void setVariableList(final VariableListVo variables) {
|
137 |
185
| this.variableList = variables;
|
138 |
| } |
139 |
| |
140 |
4848
| public final VariableList getVariableList() {
|
141 |
4848
| return variableList;
|
142 |
| } |
143 |
| |
144 |
| |
145 |
| |
146 |
| |
147 |
| |
148 |
| |
149 |
224
| public final void setTerm(final TermVo term) {
|
150 |
224
| this.term = term;
|
151 |
| } |
152 |
| |
153 |
6033
| public final Term getTerm() {
|
154 |
6033
| return term;
|
155 |
| } |
156 |
| |
157 |
| |
158 |
| |
159 |
| |
160 |
| |
161 |
| |
162 |
16
| public final void setDescription(final LatexListVo description) {
|
163 |
16
| this.description = description;
|
164 |
| } |
165 |
| |
166 |
761
| public LatexList getDescription() {
|
167 |
761
| return description;
|
168 |
| } |
169 |
| |
170 |
81
| public boolean equals(final Object obj) {
|
171 |
81
| if (!(obj instanceof FunctionDefinition)) {
|
172 |
8
| return false;
|
173 |
| } |
174 |
73
| final FunctionDefinition other = (FunctionDefinition) obj;
|
175 |
73
| return EqualsUtility.equals(getArgumentNumber(), other.getArgumentNumber())
|
176 |
| && EqualsUtility.equals(getName(), other.getName()) |
177 |
| && EqualsUtility.equals(getLatexPattern(), other.getLatexPattern()) |
178 |
| && EqualsUtility.equals(getVariableList(), other.getVariableList()) |
179 |
| && EqualsUtility.equals(getTerm(), other.getTerm()) |
180 |
| && EqualsUtility.equals(getDescription(), other.getDescription()); |
181 |
| } |
182 |
| |
183 |
92
| public int hashCode() {
|
184 |
92
| return (getArgumentNumber() != null ? getArgumentNumber().hashCode() : 0)
|
185 |
92
| ^ (getName() != null ? 1 ^ getName().hashCode() : 0)
|
186 |
92
| ^ (getLatexPattern() != null ? 2 ^ getLatexPattern().hashCode() : 0)
|
187 |
92
| ^ (getVariableList() != null ? 3 ^ getVariableList().hashCode() : 0)
|
188 |
92
| ^ (getTerm() != null ? 4 ^ getTerm().hashCode() : 0)
|
189 |
92
| ^ (getDescription() != null ? 5 ^ getDescription().hashCode() : 0);
|
190 |
| } |
191 |
| |
192 |
58
| public String toString() {
|
193 |
58
| final StringBuffer buffer = new StringBuffer();
|
194 |
58
| buffer.append("Function Definition arguments=" + getArgumentNumber() + "\n");
|
195 |
58
| buffer.append("\tname=" + getName() + "\n");
|
196 |
58
| buffer.append("\tpattern=" + getLatexPattern() + "\n");
|
197 |
58
| buffer.append("\tvariables=" + getVariableList() + "\n");
|
198 |
58
| buffer.append("\tformula/term:\n" + getTerm() + "\n");
|
199 |
58
| buffer.append("\tdescription:\n" + getDescription() + "\n");
|
200 |
58
| return buffer.toString();
|
201 |
| } |
202 |
| |
203 |
| } |